@utilityjs/use-isomorphic-layout-effect
v1.0.2
Published
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).
Downloads
7
Maintainers
Readme
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;