useIsomorphicLayoutEffect
A React hook that schedules a React.useLayoutEffect
with a fallback to a React.useEffect
for environments where layout effects should not be used (such as server-side rendering).
npm i @utilityjs/use-isomorphic-layout-effect | yarn add @utilityjs/use-isomorphic-layout-effect
API
useIsomorphicLayoutEffect(effect, deps?)
declare const useIsomorphicLayoutEffect: typeof React.useLayoutEffect;