lib/react/component/callbacks.rb in isomorfeus-react-16.8.4 vs lib/react/component/callbacks.rb in isomorfeus-react-16.8.5

- old
+ new

@@ -30,11 +30,11 @@ def component_did_update(&block) %x{ var fun = function(prev_props, prev_state, snapshot) { Opal.React.active_redux_components.push(this.__ruby_instance); - #{`this.__ruby_instance`.instance_exec(`Opal.React.Component.Props.$new(prev_props)`, + #{`this.__ruby_instance`.instance_exec(`Opal.React.Component.Props.$new({props: prev_props})`, `Opal.React.Component.State.$new({state: prev_state})`, `snapshot`, &block)}; Opal.React.active_redux_components.pop(); } if (self.lucid_react_component) { self.lucid_react_component.prototype.componentDidUpdate = fun; } @@ -71,11 +71,11 @@ def get_derived_state_from_props(&block) %x{ var fun = function(props, state) { Opal.React.active_redux_components.push(this.__ruby_instance); - #{`this.__ruby_instance`.instance_exec(`Opal.React.Component.Props.$new(props)`, + #{`this.__ruby_instance`.instance_exec(`Opal.React.Component.Props.$new({props: props})`, `Opal.React.Component.State.$new({state: state})`, &block)}; Opal.React.active_redux_components.pop(); } if (self.lucid_react_component) { self.lucid_react_component.prototype.getDerivedStateFromProps = fun; } @@ -85,10 +85,10 @@ def get_snapshot_before_update(&block) %x{ var fun = function(prev_props, prev_state) { Opal.React.active_redux_components.push(this.__ruby_instance); - #{`this.__ruby_instance`.instance_exec(`Opal.React.Component.Props.$new(prev_props)`, + #{`this.__ruby_instance`.instance_exec(`Opal.React.Component.Props.$new({props: prev_props})`, `Opal.React.Component.State.$new({state: prev_state})`, &block)}; Opal.React.active_redux_components.pop(); } if (self.lucid_react_component) { self.lucid_react_component.prototype.getSnapshotBeforeUpdate = fun; }