UNPKG

1.4 kBJavaScriptView Raw
1"use strict";
2
3exports.__esModule = true;
4var _exportNames = {
5 batch: true
6};
7exports.batch = void 0;
8
9var _shim = require("use-sync-external-store/shim");
10
11var _withSelector = require("use-sync-external-store/shim/with-selector");
12
13var _useSelector = require("./hooks/useSelector");
14
15var _connect = require("./components/connect");
16
17var _batch = require("./utils/batch");
18
19var _exports = require("./exports");
20
21Object.keys(_exports).forEach(function (key) {
22 if (key === "default" || key === "__esModule") return;
23 if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
24 if (key in exports && exports[key] === _exports[key]) return;
25 Object.defineProperty(exports, key, {
26 enumerable: true,
27 get: function () {
28 return _exports[key];
29 }
30 });
31});
32// The "alternate renderers" entry point is primarily here to fall back on a no-op
33// version of `unstable_batchedUpdates`, for use with renderers other than ReactDOM/RN.
34// Examples include React-Three-Fiber, Ink, etc.
35// Because of that, we'll also assume the useSyncExternalStore compat shim is needed.
36(0, _useSelector.initializeUseSelector)(_withSelector.useSyncExternalStoreWithSelector);
37(0, _connect.initializeConnect)(_shim.useSyncExternalStore);
38// For other renderers besides ReactDOM and React Native,
39// use the default noop batch function
40const batch = (0, _batch.getBatch)();
41exports.batch = batch;
\No newline at end of file