martyjs / marty

A Javascript library for state management in React applications
http://martyjs.org
MIT License
1.09k stars 76 forks source link

Do not setState in container unless component is mounted #265

Closed oliverwoodings closed 9 years ago

oliverwoodings commented 9 years ago

Just came across a scenario where a store update caused the container to try and call setState when it was no longer mounted. This PR ensures setState is not called from onStoreChanged unless the container is currently mounted.