Skip to main content
K
Last modified: 24/Jun/2024

useIsomorphicLayoutEffect

This hook is used to allow SSR and is responsible of switching between useEffect and useLayoutEffect hooks based on the context.

#Usage

import { useIsomorphicLayoutEffect } from "@kinsta/use-isomorphic-layout-effect"; const MyHook = () => { useIsomorphicLayoutEffect(() => { // do something }); };