isomorfeus-react 16.9.17 → 16.9.18
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 108653f20affa421b1abc4acb906fff9e995bb36f66909efa563b1dc089c76f1
|
4
|
+
data.tar.gz: 06cd1f9997c5c854309f35be54864d6ef62ec4a229e7df4601362844242a17a3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7e039ef1f30671a144a667d00005b6a564fe6698b60166b66549b8cf41676f6cb3828caefab1955b4beb28020cbad14d72137234bd737ea84da040a03433a450
|
7
|
+
data.tar.gz: 5f0fc6c7bd71df4f9acaac44779f299e8b7a5fe6c1452a1cfb8d408839b0a07fe067d850d63bf782242456fc5c2fc867bf8da2edba8c2303f1bd0dd558ac1d58
|
data/lib/isomorfeus/config.rb
CHANGED
@@ -74,9 +74,11 @@ module Isomorfeus
|
|
74
74
|
|
75
75
|
def force_render
|
76
76
|
begin
|
77
|
-
if top_component
|
78
|
-
ReactDOM.find_dom_node(top_component) # if not mounted will raise
|
77
|
+
if Isomorfeus.top_component
|
78
|
+
ReactDOM.find_dom_node(Isomorfeus.top_component) # if not mounted will raise
|
79
79
|
top_component.JS.forceUpdate()
|
80
|
+
else
|
81
|
+
`location.reload()` if on_browser?
|
80
82
|
end
|
81
83
|
rescue
|
82
84
|
`location.reload()` if on_browser?
|
data/lib/isomorfeus/top_level.rb
CHANGED
@@ -74,11 +74,12 @@ module Isomorfeus
|
|
74
74
|
element = element_or_query
|
75
75
|
end
|
76
76
|
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
77
|
+
top = if hydrated
|
78
|
+
ReactDOM.hydrate(React.create_element(component, props), element)
|
79
|
+
else
|
80
|
+
ReactDOM.render(React.create_element(component, props), element)
|
81
|
+
end
|
82
|
+
Isomorfeus.top_component = top if top
|
82
83
|
end
|
83
84
|
end
|
84
85
|
end
|
@@ -26,6 +26,7 @@ module LucidApp
|
|
26
26
|
};
|
27
27
|
this.__ruby_instance = base.$new(this);
|
28
28
|
this.__object_id = this.__ruby_instance.$object_id().$to_s();
|
29
|
+
if (Opal.Isomorfeus.$top_component() == nil) { Opal.Isomorfeus['$top_component='](this); }
|
29
30
|
if (!this.state.component_state) {
|
30
31
|
this.state.component_state = {};
|
31
32
|
this.state.component_state[this.__object_id] = {};
|
@@ -27,6 +27,7 @@ module LucidMaterial
|
|
27
27
|
};
|
28
28
|
this.__ruby_instance = base.$new(this);
|
29
29
|
this.__object_id = this.__ruby_instance.$object_id().$to_s();
|
30
|
+
if (Opal.Isomorfeus.$top_component() == nil) { Opal.Isomorfeus['$top_component='](this); }
|
30
31
|
if (!this.state.component_state) {
|
31
32
|
this.state.component_state = {};
|
32
33
|
this.state.component_state[this.__object_id] = {};
|
data/lib/react/version.rb
CHANGED