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