isomorfeus-react 16.8.3 → 16.8.4

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: 87da6715bc1c82a1d0399ccc0cf50405c03ba38c221d8a2aef1a3b7bfb133cdc
4
- data.tar.gz: 2be16e621f8df169986563a2c63311f732eb887a9de849f3d734bcd5302dc639
3
+ metadata.gz: 628a938fb57502749eff1d8736a86caae34e64bc297ac010979734d23706756f
4
+ data.tar.gz: b8b7becfb6b8a18b39332120d7b26c83276f3758af83b2c0562551e03e2ef560
5
5
  SHA512:
6
- metadata.gz: bbf289350bacb3952d36737f147fe03382e9613c719af481cd68bab554e0e66655ec4b74f3d5a700dfa5412799f61667e75bd1b009626b92b62256ca5fe33879
7
- data.tar.gz: 3ceaa36ed316f28f653e45cabe8697d44bc2375ee2daaf51dc0dfcd246991cd024ddd9cb6391fbb027d43201e429aa0a151c6fcf58c33b42f9fbb31b9af3e80c
6
+ metadata.gz: 4d14d2ea8264daffdba51b4c751276ccdb9a0b9a7a3207256b5685ed59e6e23a20cf10d2f5f7998b4b36dc8e75b7dc0384978b4700b3fbbaa3425c401037fe14
7
+ data.tar.gz: '04869ca2a335a6ab7d227c13ba9b1b8451399e68f6ad3cc16c504485d9b38d0713ba9885727df6151080a8b4aa8e5ed36e6009508383f84d9be552b5ace77125'
@@ -2,6 +2,7 @@ module Isomorfeus
2
2
  if RUBY_ENGINE == 'opal'
3
3
  class << self
4
4
  attr_accessor :initial_state_fetched
5
+ attr_accessor :top_component
5
6
  attr_reader :initialized
6
7
  attr_reader :env
7
8
 
@@ -56,11 +57,7 @@ module Isomorfeus
56
57
  end
57
58
 
58
59
  def force_render
59
- @render_trigger ||= 1
60
- @render_trigger += 1
61
- action = { type: 'APPLICATION_STATE', name: 'render_trigger', value: @render_trigger }
62
- Isomorfeus.store.dispatch(action)
63
- @render_trigger
60
+ top_component.JS.forceUpdate()
64
61
  end
65
62
  end
66
63
 
@@ -48,11 +48,11 @@ module Isomorfeus
48
48
  element = element_or_query
49
49
  end
50
50
 
51
- if hydrated
52
- ReactDOM.hydrate(React.create_element(component, props), element)
53
- else
54
- ReactDOM.render(React.create_element(component, props), element)
55
- end
51
+ Isomorfeus.top_component = if hydrated
52
+ ReactDOM.hydrate(React.create_element(component, props), element)
53
+ else
54
+ ReactDOM.render(React.create_element(component, props), element)
55
+ end
56
56
  end
57
57
  end
58
58
  end
@@ -102,13 +102,19 @@ module LucidMaterial
102
102
  }
103
103
  }
104
104
  base.lucid_material_component = null;
105
- base.react_component = function(outer_props) {
106
- if (!base.lucid_material_component) {
107
- base.lucid_material_component = Opal.global.MuiStyles.withStyles(base.jss_styles)(function(props){
108
- return Opal.global.React.createElement(base.lucid_react_component, props);
109
- });
105
+ base.react_component = class extends Opal.global.React.Component {
106
+ constructor(props) { super(props) }
107
+ static get displayName() {
108
+ return #{component_name} + 'Shell';
109
+ }
110
+ render() {
111
+ if (!base.lucid_material_component) {
112
+ base.lucid_material_component = Opal.global.MuiStyles.withStyles(base.jss_styles)(function(props){
113
+ return Opal.global.React.createElement(base.lucid_react_component, props);
114
+ });
115
+ }
116
+ return Opal.global.React.createElement(base.lucid_material_component, this.props);
110
117
  }
111
- return Opal.global.React.createElement(base.lucid_material_component, outer_props);
112
118
  }
113
119
  }
114
120
  end
@@ -1,3 +1,3 @@
1
1
  module React
2
- VERSION = '16.8.3'
2
+ VERSION = '16.8.4'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: isomorfeus-react
3
3
  version: !ruby/object:Gem::Version
4
- version: 16.8.3
4
+ version: 16.8.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jan Biedermann
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-06-11 00:00:00.000000000 Z
11
+ date: 2019-06-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: oj