@utilityjs/use-isomorphic-layout-effect
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

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

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;

/@utilityjs/use-isomorphic-layout-effect/

    Package Sidebar

    Install

    npm i @utilityjs/use-isomorphic-layout-effect

    Weekly Downloads

    2

    Version

    1.0.2

    License

    MIT

    Unpacked Size

    4.18 kB

    Total Files

    8

    Last publish

    Collaborators

    • mimshins