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.
32 lines
719 B
32 lines
719 B
"use strict";
|
|
|
|
exports.__esModule = true;
|
|
exports.default = exports.ReactReduxContext = void 0;
|
|
|
|
var _react = require("react");
|
|
|
|
let realContext = null;
|
|
|
|
function getContext() {
|
|
if (!realContext) {
|
|
realContext = (0, _react.createContext)(null);
|
|
|
|
if (process.env.NODE_ENV !== 'production') {
|
|
realContext.displayName = 'ReactRedux';
|
|
}
|
|
}
|
|
|
|
return realContext;
|
|
}
|
|
|
|
const ReactReduxContext = /*#__PURE__*/new Proxy({}, /*#__PURE__*/new Proxy({}, {
|
|
get(_, handler) {
|
|
const target = getContext(); // @ts-ignore
|
|
|
|
return (_target, ...args) => Reflect[handler](target, ...args);
|
|
}
|
|
|
|
}));
|
|
exports.ReactReduxContext = ReactReduxContext;
|
|
var _default = ReactReduxContext;
|
|
exports.default = _default; |