use-sync-external-store.development.js 1.3 KB

123456789101112131415161718192021222324252627
  1. /**
  2. * @license React
  3. * use-sync-external-store.development.js
  4. *
  5. * Copyright (c) Meta Platforms, Inc. and affiliates.
  6. *
  7. * This source code is licensed under the MIT license found in the
  8. * LICENSE file in the root directory of this source tree.
  9. */
  10. "use strict";
  11. if ("production" !== process.env.NODE_ENV) {
  12. "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
  13. "function" ===
  14. typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart &&
  15. __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
  16. var useSyncExternalStore$jscomp$inline_1 =
  17. require("react").useSyncExternalStore;
  18. console.error(
  19. "The main 'use-sync-external-store' entry point is not supported; all it does is re-export useSyncExternalStore from the 'react' package, so it only works with React 18+.\n\nIf you wish to support React 16 and 17, import from 'use-sync-external-store/shim' instead. It will fall back to a shimmed implementation when the native one is not available.\n\nIf you only support React 18+, you can import directly from 'react'."
  20. );
  21. exports.useSyncExternalStore = useSyncExternalStore$jscomp$inline_1;
  22. "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
  23. "function" ===
  24. typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
  25. __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
  26. }