dillon1000/react
Commit
Browse files Add `ReactComponent#isMounted`
There is currently no way for components to know whether or not they are mounted. This means there's no way for callbacks to figure out if they can make certain assumptions (e.g. can `getDOMNode()` or `setState()` be safely invoked). This adds an `isMounted` protected method that lets components properly handle callback behavior when unmounted.
Changed paths3 files
First-parent comparisonsrc/core/ReactComponent.js ModifiedM src/core/ReactCompositeComponent.js ModifiedM src/core/__tests__/ReactNativeComponent-test.js ModifiedPatch
Files changed
Rendering syntax-highlighted changes…