{"version":3,"sources":["../../src/use-isomorphic-layout-effect/index.ts"],"sourcesContent":["import { useEffect, useLayoutEffect } from 'react'\nimport { isClient } from '../utils/basic'\n\nexport type UseEffect = typeof useEffect\n\n/**\n * A React Hook that will automatically use [React.useLayoutEffect](https://react.dev/reference/react/useLayoutEffect) in client side,\n *\n * and [React.useEffect](https://react.dev/reference/react/useEffect) in server side to avoid the warning of `useLayoutEffect` in Server-side Rendering (SSR).\n */\nexport const useIsomorphicLayoutEffect: UseEffect = isClient ? useLayoutEffect : useEffect\n"],"names":["useIsomorphicLayoutEffect","isClient","useLayoutEffect","useEffect"],"mappings":";;;;+BAUaA;;;eAAAA;;;qBAV8B;qBAClB;AASlB,IAAMA,4BAAuCC,eAAQ,GAAGC,sBAAe,GAAGC,gBAAS"}