All callback handlers that take parameters (component_will_receive_props, component_will_update, component_did_update) as well as should_component_update? are actually broken ATM.
The params to these methods are hashes, and the create_native_react_class method was refactored so that the conversion from a JS object to Opal Hash is done in before the method is called.
However the methods themselves still assume that a native JS object is coming in and redoes the conversion. Current version of Opal in this case does not simply return a hash if you try to create a hash this way. I suspect previous versions had a different behavior, and hence this error was not caught.
The fix is easy, the problem is it will change the behavior of these methods. For example see #213 .
So when we fix we should include a mechanism to turn on the old behavior with a deprecation notice.
All callback handlers that take parameters (component_will_receive_props, component_will_update, component_did_update) as well as should_component_update? are actually broken ATM.
The params to these methods are hashes, and the
create_native_react_class
method was refactored so that the conversion from a JS object to Opal Hash is done in before the method is called.However the methods themselves still assume that a native JS object is coming in and redoes the conversion. Current version of Opal in this case does not simply return a hash if you try to create a hash this way. I suspect previous versions had a different behavior, and hence this error was not caught.
The fix is easy, the problem is it will change the behavior of these methods. For example see #213 .
So when we fix we should include a mechanism to turn on the old behavior with a deprecation notice.