Cleanup function
Also written: cleanup, clean-up function
The function an effect returns. React runs it before the effect runs again and when the component unmounts, for example to stop a timer or abort a request.
Also written: cleanup, clean-up function
The function an effect returns. React runs it before the effect runs again and when the component unmounts, for example to stop a timer or abort a request.