1 | ;
|
2 |
|
3 | exports.__esModule = true;
|
4 | exports.default = void 0;
|
5 | var _react = require("react");
|
6 | const isReactNative = typeof global !== 'undefined' &&
|
7 | // @ts-ignore
|
8 | global.navigator &&
|
9 | // @ts-ignore
|
10 | global.navigator.product === 'ReactNative';
|
11 | const isDOM = typeof document !== 'undefined';
|
12 |
|
13 | /**
|
14 | * Is `useLayoutEffect` in a DOM or React Native environment, otherwise resolves to useEffect
|
15 | * Only useful to avoid the console warning.
|
16 | *
|
17 | * PREFER `useEffect` UNLESS YOU KNOW WHAT YOU ARE DOING.
|
18 | *
|
19 | * @category effects
|
20 | */
|
21 | var _default = isDOM || isReactNative ? _react.useLayoutEffect : _react.useEffect;
|
22 | exports.default = _default; |
\ | No newline at end of file |