hyper-react icon indicating copy to clipboard operation
hyper-react copied to clipboard

argument supplied to before_receive_props callback has value nested inside dict, i.e. value=next_props[:key][:key] should be id=next_props[:key]

Open bradder555 opened this issue 7 years ago • 1 comments

Hi All

Upgraded from reactrb 0.8.8 opal 0.9.4 react-rails 1.8.2

to hyper-react 0.11.0 opal 0.10.3 react-rails 1.10.0

Most things are working exactly as expected, although somewhere along the line, the way "before_receive_props" has changed.

Before my before_receive_props would look like this: before_receive_props do |next_props| if next_props[:object_id] == params.object_id then return end update_hidden_component_state(next_props[:object_id]) end

Since the upgrade, i've had to change every instance of before receive props to: before_receive_props do |next_props| if next_props[:object_id][:object_id] == params.object_id then return end update_hidden_component_state(next_props[:object_id][:object_id]) end

Once i'd realized why my app was throwing feces everywhere; the situation wasn't so bad, it's just a bit clunky like this. I'm going to try and work out what's going on here but I've got a backlog of other stuff that I need to see to first.

Thanks folks :+1:

bradder555 avatar Mar 07 '17 05:03 bradder555

That was a nasty bug... thanks for reporting. We will fix in the next point release, and put some kind of mechanism to allow your code to transition.

@bradder555 - I apologize that this has lingered for so long... Somehow it got missed in our triage process.

catmando avatar Nov 15 '17 20:11 catmando