@restart/hooks 
A set of utility and general-purpose React hooks.
Install
npm install @restart/hooks
Usage
import useInterval from '@restart/hooks/useInterval'
useInterval(() => loop(), 300, false)
A set of utility and general-purpose React hooks.
no longer supports cancelPrevious
this is always true
fix:(useDebouncedCallback): Clean up timeout logic in strict mode
chore: deprecate useWillUnmount
This hook is not possible in StrictMode, and can cause bugs
fix(useForceUpdate): ensure that chained calls produce an update
Update useCustomEffect.ts
address feedback
null
in the native API means "the window", this is a departure to allow a consumer to hold off setting up the observer until the have a ref to the root. This was possible before by explicitly setting element to null
until the root is available but still created an extra observer