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

FluxMixin: check if component is mounted when updating #36

Merged
merged 3 commits into from
Feb 18, 2015

Conversation

conradz
Copy link
Contributor

@conradz conradz commented Feb 18, 2015

Not sure exactly how it happens, but I ran into this bug in a fairly complex application. Somehow the change events get run even after the component is unmounted by a parent component. I think it has to do with the parent and child both listening to the same change event, the parent change handler is invoked first which removes the child, then the child handler is invoked immediately after.

This fixes it in FluxMixin by checking if the component is mounted before updating the state.

@acdlite
Copy link
Owner

acdlite commented Feb 18, 2015

Awesome, thank you!

acdlite added a commit that referenced this pull request Feb 18, 2015
FluxMixin: check if component is mounted when updating
@acdlite acdlite merged commit e1ec65f into acdlite:master Feb 18, 2015
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

Successfully merging this pull request may close these issues.

2 participants