Hooks
Effect cleanup
Undo the setup using the original resource and callback. Cleanup also precedes resynchronization.
Formal Syntax & Structure
react syntaxreact
return () => release(resource);Working Example
Example Snippetreact
return () => clearInterval(timer);