After certain time leads to Redux warning "setState() on an unmounted component"
See original GitHub issueI am testing v5 alpha from #416 and noticed that after some time every re-render in one of my components starts triggering following warning:
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
My best guess is that there is a memory leak somewhere and new connect holds a reference to unmounted component. Triple checked that it doesn’t happen with 4.4.5
.
It doesn’t happen right away, only after I switch back and forth between routes that re-render a lot of components. I don’t have time to dig deeper and set up a test project, but I can create a branch in my public repo where it’s happening to reproduce. Please let me know if you want this.
Issue Analytics
- State:
- Created 7 years ago
- Comments:22 (15 by maintainers)
Top Results From Across the Web
React warning about setState in unmounted component
Warning : Can't call setState (or forceUpdate) on an unmounted component. This is a no-op, but it indicates a memory leak in your...
Read more >Avoid React state update warnings on unmounted components
React raising a warning when you try to perform a state update on an unmounted component. React setState is used to update the...
Read more >Prevent React setState on unmounted Component
The shown warning(s) usually show up when this.setState() is called in a component even though the component got already unmounted.
Read more >How to work with React the right way to avoid some common ...
Warning : Can't call setState (or forceUpdate) on an unmounted component. This is a no-op, but it indicates a memory leak in your...
Read more >React state update on an unmounted component - debuggr.io
Warning : Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
react-redux-5.0.0-beta.1
has been published toreact-router@next
!Don’t hesitate to send a PR with minimal repro setup for the branch I created @vhmh