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.
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.