use-isomorphic-layout-effect.ts 178 B

123456
  1. import React from 'react';
  2. const useIsomorphicLayoutEffect =
  3. typeof window !== "undefined" ? React.useLayoutEffect : React.useEffect
  4. export default useIsomorphicLayoutEffect