DEV Community

Discussion on: How to use componentWillUnmount with Functional Components in React

Collapse
 
robmarshall profile image
Robert Marshall

I suppose you could use a useRef to track the render (it will not be cleaned on a rerender). Depends on what you need it to do.