isomorfeus-react 16.8.8 → 16.8.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ade4ec53c51f197488b13e348ee86d99f89bb618207e8bee8c63a10fbedc5ef0
4
- data.tar.gz: e8a0a41bc73cbacca961b40b233ac7a9b43c075fd731ed73cbf5c803271aa129
3
+ metadata.gz: d87683e6af7a40a9c820e65e73bdca513e770fb22dc298ac1eb5fc643694c8fc
4
+ data.tar.gz: ed99bccaffec6a4e3e40f2974b77320f467977f18d04fb3671d3fc8fa7c2db8a
5
5
  SHA512:
6
- metadata.gz: '0604568cd6bcc6679a05aa5d17c713b521420cc00f81bd1a606e0ed63e30a936fe8acb192bc410dac1a5f749d77d1f5f96d9cb1f70e72d25344b1669bbe5c160'
7
- data.tar.gz: 11a1438224aa6661e0fc3c19dd14083b1840f7f687f83bb68f8883833e2afeba3aeaa8b0b101f7a43220dee228ffd249b778bfe1dc82d0282738774a2cd98fc9
6
+ metadata.gz: 3d7fa25dd6ba783c514f64a91f8a01e70f39d6a208580c977e92501e6617a6447c5b0d04c0c387abedc6a7f59b2505ab1aeaabf080a9f9168f5af9be2391d3ba
7
+ data.tar.gz: 0ce87684545abfcee53fb6e2a3f307e1262c92a3cc1d55fcf9aebbdbe994a07f99c0fa2ce2ff4b3e7628710f692f02a26238b46f619643402ff089985b455133
@@ -11,10 +11,13 @@ module Isomorfeus
11
11
  hydrated = root_element.JS.getAttribute('data-iso-hydrated')
12
12
  state_json = root_element.JS.getAttribute('data-iso-state')
13
13
  if state_json
14
- state = `JSON.parse(state_json)`
15
- Isomorfeus.store.JS[:native].JS.dispatch(`{ type: 'APPLICATION_STATE', set_state: state.application_state }`)
16
- Isomorfeus.store.JS[:native].JS.dispatch(`{ type: 'COMPONENT_STATE', set_state: state.component_state }`)
17
- Isomorfeus.store.JS[:native].JS.dispatch(`{ type: 'COMPONENT_CLASS_STATE', set_state: state.component_class_state }`)
14
+ %x{
15
+ var state = JSON.parse(state_json);
16
+ var keys = Object.keys(state);
17
+ for(var i=0; i < keys.length; i++) {
18
+ global.Opal.Isomorfeus.store.native.dispatch({ type: keys[i].toUpperCase(), set_state: state[keys[i]] });
19
+ }
20
+ }
18
21
  end
19
22
  mount_component(component, props, root_element, hydrated)
20
23
  end
@@ -1,3 +1,3 @@
1
1
  module React
2
- VERSION = '16.8.8'
2
+ VERSION = '16.8.9'
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.8
4
+ version: 16.8.9
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-07-26 00:00:00.000000000 Z
11
+ date: 2019-07-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: oj