DEV Community

Discussion on: An elegant solution for memory leaks in React

Collapse
 
kyimoemin profile image
Kyi-Moe-Min

I think your solution will work if you use useRef to isMounted variable.