1.0.2 • Published 4 years ago
@utilityjs/use-isomorphic-layout-effect v1.0.2
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-effectAPI
useIsomorphicLayoutEffect(effect, deps?)
declare const useIsomorphicLayoutEffect: typeof React.useLayoutEffect;