Skip to content

useIsomorphicLayoutEffect ​

Category
Lifecycle

Hook conditionally selects either `useLayoutEffect` or `useEffect` based on the environment

typescript
import { useIsomorphicLayoutEffect } from '@siberiacancode/reactuse';

Usage ​

typescript
useIsomorphicLayoutEffect(() => console.log('effect'), [])

Demo ​

Api ​

Contributors ​

Source • Demo