1.0.2 • Published 3 years ago

@utilityjs/use-isomorphic-layout-effect v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

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).

license npm latest package npm downloads types

npm i @utilityjs/use-isomorphic-layout-effect | yarn add @utilityjs/use-isomorphic-layout-effect

API

useIsomorphicLayoutEffect(effect, deps?)

declare const useIsomorphicLayoutEffect: typeof React.useLayoutEffect;