Dashboard sipadu mbip
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

useIsomorphicEffect.js 611B

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