react-native-easy-toast
react-native-easy-toast copied to clipboard
Can't call setState
with the example from the readme:
I get this:
ExceptionsManager.js:71 Warning: Can't call setState (or forceUpdate) on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in the componentWillUnmount method.
in Toast (at ConfirmScene.js:102)
in RCTView (at View.js:60)
in View (at ConfirmScene.js:55)
in ConfirmScene (created by Connect(ConfirmScene))
in Connect(ConfirmScene) (at SceneView.js:17)
RN is version is 0.55.3
Did you put the toaster view in the render method ?
render() { return ( <View style={styles.container}> ... <Toast ref="toast"/> </View> ); }
@hassanamin994 I do have the Toast in render(). Is that an issue?
Any updates on this?
I've created a PR to address this issue:
https://github.com/crazycodeboy/react-native-easy-toast/pull/66