Skip to contentOpen History to see the last commit
useIsomorphicLayoutEffect.ts
5 lines173 Bytes
1import { useEffect, useLayoutEffect } from 'rehackt' 3export const useIsomorphicLayoutEffect = 5 typeof window !== 'undefined' ? useLayoutEffect : useEffect