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: a78b7f6de2b24a82c500e35b74919f9e331bd0a7e4d797f355f79a755e855a07
4
- data.tar.gz: 546561eced5206c1f8edf0dccdc11bcbfa5b665eb7404fe47b0722b311dd3176
3
+ metadata.gz: 108653f20affa421b1abc4acb906fff9e995bb36f66909efa563b1dc089c76f1
4
+ data.tar.gz: 06cd1f9997c5c854309f35be54864d6ef62ec4a229e7df4601362844242a17a3
5
5
  SHA512:
6
- metadata.gz: 8cdfc880b7a0a6ef1c5d2d6b7fb10ee5292be980311244d5e84347d7f8599856fa2a47ac0ee02ac7ae664fe56c5f512c5c3299774002b0d43e2feede6d00855c
7
- data.tar.gz: e6d742909a28d9cd6ea1af7c0556c9301888b8af64742fa7e8f6e7f98bcc9b095d50626bb2f4351f153650bcbe0ad19cb27b9bd199f493bf44eb841724298142
6
+ metadata.gz: 7e039ef1f30671a144a667d00005b6a564fe6698b60166b66549b8cf41676f6cb3828caefab1955b4beb28020cbad14d72137234bd737ea84da040a03433a450
7
+ data.tar.gz: 5f0fc6c7bd71df4f9acaac44779f299e8b7a5fe6c1452a1cfb8d408839b0a07fe067d850d63bf782242456fc5c2fc867bf8da2edba8c2303f1bd0dd558ac1d58
@@ -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?
@@ -74,11 +74,12 @@ module Isomorfeus
74
74
  element = element_or_query
75
75
  end
76
76
 
77
- Isomorfeus.top_component = if hydrated
78
- ReactDOM.hydrate(React.create_element(component, props), element)
79
- else
80
- ReactDOM.render(React.create_element(component, props), element)
81
- end
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
@@ -1,3 +1,3 @@
1
1
  module React
2
- VERSION = '16.9.17'
2
+ VERSION = '16.9.18'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: isomorfeus-react
3
3
  version: !ruby/object:Gem::Version
4
- version: 16.9.17
4
+ version: 16.9.18
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jan Biedermann