DEV Community

Discussion on: An elegant solution for memory leaks in React

Collapse
 
nans profile image
Nans Dumortier

Thanks for your comment!
I don't think this would work, since if you update the state in action_1 or action_2 after the component has been unmounted, you will get the warning. Here is a codesandbox example :
codesandbox.io/s/trusting-mountain...
Or did I miss your point ?