DEV Community

Discussion on: How to use React Hooks - 2 most commonly used Hooks explained ✨

 
sebalr profile image
Sebastian Larrieu

That's executed before the next useEffect, for example if you set a timeout inside useEffect, you must cancel it as return callback, so in the next execution, before setting the new timeout, the previously one is good to be cleared