Closed levsthings closed 7 years ago
@levsthings no plans currently. Accepting PR's if you want to contribute. If not I'll look at it this over the weekend.
-Chad
@sahlhoff I believe I have resolved this issue with my pull request last time: https://github.com/sahlhoff/react-native-pulse/pull/5
But the npm package has not been updated.
Clearing the timers was a great addition but that doesn't fix this particular problem. (I'm using the component from the repo.)
I'll post a detailed issue report in a few hours.
React Native Version : 0.42.0 React-Native-Pulse Version : Latest from the GitHub Repo
Problem: When user navigates away from a component that is rendering Pulse, you get the following warning. (Even though Pulse is dismounted.)
Warning: setState(...): Can only update a mounted or mounting component. This usually means you called setState() on an unmounted component. This is a no-op. Please check the code for the Pulse component.
StackTrace:
/project/node_modules/react-native/Libraries/Renderer/src/renderers/shared/stack/reconciler/ReactUpdateQueue.js:48
/project/node_modules/react-native/Libraries/Renderer/src/renderers/shared/stack/reconciler/ReactUpdateQueue.js:234
/project/components/Pulse.js:106
/project/components/Pulse.js:60
/project/node_modules/react-native/Libraries/Core/Timers/JSTimers.js:80
/project/node_modules/react-native/Libraries/Core/Timers/JSTimers.js:80
/project/node_modules/react-native/Libraries/Core/Timers/JSTimersExecution.js:136
/project/node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:108
/project/node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:46
/project/node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:107
I'm trying to think of some solutions but couldn't come with anything other than suppressing the warnings with a hacky method. Any ideas @sahlhoff @yerushanuh ?
So is there a fix for this?
@muresanandrei @sahlhoff you can watch/merge my PR https://github.com/sahlhoff/react-native-pulse/pull/7
Closing this after merging #7
@sahlhoff I really like the module but I'm having a problem with the
React setState can only update a mounted or mounting component
warning when changing views thus unmounting a component which uses this module.Do you have any plans for clearing the callbacks?