jaredLunde/react-hook

Timeout shoud be cleared on hook destroy

eaglus opened this issue · 0 comments

gtag('event', 'optimize.callback', {

Otherwise, we have error message in console:

patchConsole.ts:40 Warning: Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in a useEffect cleanup function.