react-native-easy-toast icon indicating copy to clipboard operation
react-native-easy-toast copied to clipboard

Fix `setState` warning

Open cdunkel opened this issue 6 years ago • 0 comments

This PR fixes a warning that can be trigged if and when the component tries to call setState when no longer mounted. The fix involves maintaining a flag that is updated when the component mounts/unmounts and only calling setState if the flag indicates that the component is currently mounted.

cdunkel avatar Feb 19 '19 16:02 cdunkel