You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I dispatch an action inside a component's onRemove method the redux store is updated and deku's render function is called with the store's new state, but what gets rendered is actually a snapshot of the previous state, not the current state.
If you watch the console you'll notice that after clicking the element the handler dispatches an action setting the text to Bar, then the onRemove method dispatches an action setting the text to Baz, however Bar is what appears in the final output.
The text was updated successfully, but these errors were encountered:
If I dispatch an action inside a component's
onRemove
method the redux store is updated and deku'srender
function is called with the store's new state, but what gets rendered is actually a snapshot of the previous state, not the current state.I created a jsfiddle to demonstrate this: https://jsfiddle.net/5jr3c8Lr/
If you watch the console you'll notice that after clicking the element the handler dispatches an action setting the text to
Bar
, then theonRemove
method dispatches an action setting the text toBaz
, howeverBar
is what appears in the final output.The text was updated successfully, but these errors were encountered: