Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

State change triggered in onRemove method does not get rendered #405

Open
kvnneff opened this issue Feb 14, 2016 · 0 comments
Open

State change triggered in onRemove method does not get rendered #405

kvnneff opened this issue Feb 14, 2016 · 0 comments

Comments

@kvnneff
Copy link
Contributor

kvnneff commented Feb 14, 2016

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.

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 the onRemove method dispatches an action setting the text to Baz, however Bar is what appears in the final output.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant