This commit is contained in:
117
node_modules/react-redux/lib/connect/connect.js
generated
vendored
Normal file
117
node_modules/react-redux/lib/connect/connect.js
generated
vendored
Normal file
@@ -0,0 +1,117 @@
|
||||
"use strict";
|
||||
|
||||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"];
|
||||
|
||||
exports.__esModule = true;
|
||||
exports.createConnect = createConnect;
|
||||
exports["default"] = void 0;
|
||||
|
||||
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
||||
|
||||
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
||||
|
||||
var _connectAdvanced = _interopRequireDefault(require("../components/connectAdvanced"));
|
||||
|
||||
var _shallowEqual = _interopRequireDefault(require("../utils/shallowEqual"));
|
||||
|
||||
var _mapDispatchToProps = _interopRequireDefault(require("./mapDispatchToProps"));
|
||||
|
||||
var _mapStateToProps = _interopRequireDefault(require("./mapStateToProps"));
|
||||
|
||||
var _mergeProps = _interopRequireDefault(require("./mergeProps"));
|
||||
|
||||
var _selectorFactory = _interopRequireDefault(require("./selectorFactory"));
|
||||
|
||||
var _excluded = ["pure", "areStatesEqual", "areOwnPropsEqual", "areStatePropsEqual", "areMergedPropsEqual"];
|
||||
|
||||
/*
|
||||
connect is a facade over connectAdvanced. It turns its args into a compatible
|
||||
selectorFactory, which has the signature:
|
||||
|
||||
(dispatch, options) => (nextState, nextOwnProps) => nextFinalProps
|
||||
|
||||
connect passes its args to connectAdvanced as options, which will in turn pass them to
|
||||
selectorFactory each time a Connect component instance is instantiated or hot reloaded.
|
||||
|
||||
selectorFactory returns a final props selector from its mapStateToProps,
|
||||
mapStateToPropsFactories, mapDispatchToProps, mapDispatchToPropsFactories, mergeProps,
|
||||
mergePropsFactories, and pure args.
|
||||
|
||||
The resulting final props selector is called by the Connect component instance whenever
|
||||
it receives new props or store state.
|
||||
*/
|
||||
function match(arg, factories, name) {
|
||||
for (var i = factories.length - 1; i >= 0; i--) {
|
||||
var result = factories[i](arg);
|
||||
if (result) return result;
|
||||
}
|
||||
|
||||
return function (dispatch, options) {
|
||||
throw new Error("Invalid value of type " + typeof arg + " for " + name + " argument when connecting component " + options.wrappedComponentName + ".");
|
||||
};
|
||||
}
|
||||
|
||||
function strictEqual(a, b) {
|
||||
return a === b;
|
||||
} // createConnect with default args builds the 'official' connect behavior. Calling it with
|
||||
// different options opens up some testing and extensibility scenarios
|
||||
|
||||
|
||||
function createConnect(_temp) {
|
||||
var _ref = _temp === void 0 ? {} : _temp,
|
||||
_ref$connectHOC = _ref.connectHOC,
|
||||
connectHOC = _ref$connectHOC === void 0 ? _connectAdvanced["default"] : _ref$connectHOC,
|
||||
_ref$mapStateToPropsF = _ref.mapStateToPropsFactories,
|
||||
mapStateToPropsFactories = _ref$mapStateToPropsF === void 0 ? _mapStateToProps["default"] : _ref$mapStateToPropsF,
|
||||
_ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,
|
||||
mapDispatchToPropsFactories = _ref$mapDispatchToPro === void 0 ? _mapDispatchToProps["default"] : _ref$mapDispatchToPro,
|
||||
_ref$mergePropsFactor = _ref.mergePropsFactories,
|
||||
mergePropsFactories = _ref$mergePropsFactor === void 0 ? _mergeProps["default"] : _ref$mergePropsFactor,
|
||||
_ref$selectorFactory = _ref.selectorFactory,
|
||||
selectorFactory = _ref$selectorFactory === void 0 ? _selectorFactory["default"] : _ref$selectorFactory;
|
||||
|
||||
return function connect(mapStateToProps, mapDispatchToProps, mergeProps, _ref2) {
|
||||
if (_ref2 === void 0) {
|
||||
_ref2 = {};
|
||||
}
|
||||
|
||||
var _ref3 = _ref2,
|
||||
_ref3$pure = _ref3.pure,
|
||||
pure = _ref3$pure === void 0 ? true : _ref3$pure,
|
||||
_ref3$areStatesEqual = _ref3.areStatesEqual,
|
||||
areStatesEqual = _ref3$areStatesEqual === void 0 ? strictEqual : _ref3$areStatesEqual,
|
||||
_ref3$areOwnPropsEqua = _ref3.areOwnPropsEqual,
|
||||
areOwnPropsEqual = _ref3$areOwnPropsEqua === void 0 ? _shallowEqual["default"] : _ref3$areOwnPropsEqua,
|
||||
_ref3$areStatePropsEq = _ref3.areStatePropsEqual,
|
||||
areStatePropsEqual = _ref3$areStatePropsEq === void 0 ? _shallowEqual["default"] : _ref3$areStatePropsEq,
|
||||
_ref3$areMergedPropsE = _ref3.areMergedPropsEqual,
|
||||
areMergedPropsEqual = _ref3$areMergedPropsE === void 0 ? _shallowEqual["default"] : _ref3$areMergedPropsE,
|
||||
extraOptions = (0, _objectWithoutPropertiesLoose2["default"])(_ref3, _excluded);
|
||||
var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');
|
||||
var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');
|
||||
var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');
|
||||
return connectHOC(selectorFactory, (0, _extends2["default"])({
|
||||
// used in error messages
|
||||
methodName: 'connect',
|
||||
// used to compute Connect's displayName from the wrapped component's displayName.
|
||||
getDisplayName: function getDisplayName(name) {
|
||||
return "Connect(" + name + ")";
|
||||
},
|
||||
// if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes
|
||||
shouldHandleStateChanges: Boolean(mapStateToProps),
|
||||
// passed through to selectorFactory
|
||||
initMapStateToProps: initMapStateToProps,
|
||||
initMapDispatchToProps: initMapDispatchToProps,
|
||||
initMergeProps: initMergeProps,
|
||||
pure: pure,
|
||||
areStatesEqual: areStatesEqual,
|
||||
areOwnPropsEqual: areOwnPropsEqual,
|
||||
areStatePropsEqual: areStatePropsEqual,
|
||||
areMergedPropsEqual: areMergedPropsEqual
|
||||
}, extraOptions));
|
||||
};
|
||||
}
|
||||
|
||||
var _default = /*#__PURE__*/createConnect();
|
||||
|
||||
exports["default"] = _default;
|
||||
34
node_modules/react-redux/lib/connect/mapDispatchToProps.js
generated
vendored
Normal file
34
node_modules/react-redux/lib/connect/mapDispatchToProps.js
generated
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
"use strict";
|
||||
|
||||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"];
|
||||
|
||||
exports.__esModule = true;
|
||||
exports["default"] = void 0;
|
||||
exports.whenMapDispatchToPropsIsFunction = whenMapDispatchToPropsIsFunction;
|
||||
exports.whenMapDispatchToPropsIsMissing = whenMapDispatchToPropsIsMissing;
|
||||
exports.whenMapDispatchToPropsIsObject = whenMapDispatchToPropsIsObject;
|
||||
|
||||
var _bindActionCreators = _interopRequireDefault(require("../utils/bindActionCreators"));
|
||||
|
||||
var _wrapMapToProps = require("./wrapMapToProps");
|
||||
|
||||
function whenMapDispatchToPropsIsFunction(mapDispatchToProps) {
|
||||
return typeof mapDispatchToProps === 'function' ? (0, _wrapMapToProps.wrapMapToPropsFunc)(mapDispatchToProps, 'mapDispatchToProps') : undefined;
|
||||
}
|
||||
|
||||
function whenMapDispatchToPropsIsMissing(mapDispatchToProps) {
|
||||
return !mapDispatchToProps ? (0, _wrapMapToProps.wrapMapToPropsConstant)(function (dispatch) {
|
||||
return {
|
||||
dispatch: dispatch
|
||||
};
|
||||
}) : undefined;
|
||||
}
|
||||
|
||||
function whenMapDispatchToPropsIsObject(mapDispatchToProps) {
|
||||
return mapDispatchToProps && typeof mapDispatchToProps === 'object' ? (0, _wrapMapToProps.wrapMapToPropsConstant)(function (dispatch) {
|
||||
return (0, _bindActionCreators["default"])(mapDispatchToProps, dispatch);
|
||||
}) : undefined;
|
||||
}
|
||||
|
||||
var _default = [whenMapDispatchToPropsIsFunction, whenMapDispatchToPropsIsMissing, whenMapDispatchToPropsIsObject];
|
||||
exports["default"] = _default;
|
||||
21
node_modules/react-redux/lib/connect/mapStateToProps.js
generated
vendored
Normal file
21
node_modules/react-redux/lib/connect/mapStateToProps.js
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
exports["default"] = void 0;
|
||||
exports.whenMapStateToPropsIsFunction = whenMapStateToPropsIsFunction;
|
||||
exports.whenMapStateToPropsIsMissing = whenMapStateToPropsIsMissing;
|
||||
|
||||
var _wrapMapToProps = require("./wrapMapToProps");
|
||||
|
||||
function whenMapStateToPropsIsFunction(mapStateToProps) {
|
||||
return typeof mapStateToProps === 'function' ? (0, _wrapMapToProps.wrapMapToPropsFunc)(mapStateToProps, 'mapStateToProps') : undefined;
|
||||
}
|
||||
|
||||
function whenMapStateToPropsIsMissing(mapStateToProps) {
|
||||
return !mapStateToProps ? (0, _wrapMapToProps.wrapMapToPropsConstant)(function () {
|
||||
return {};
|
||||
}) : undefined;
|
||||
}
|
||||
|
||||
var _default = [whenMapStateToPropsIsFunction, whenMapStateToPropsIsMissing];
|
||||
exports["default"] = _default;
|
||||
54
node_modules/react-redux/lib/connect/mergeProps.js
generated
vendored
Normal file
54
node_modules/react-redux/lib/connect/mergeProps.js
generated
vendored
Normal file
@@ -0,0 +1,54 @@
|
||||
"use strict";
|
||||
|
||||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"];
|
||||
|
||||
exports.__esModule = true;
|
||||
exports["default"] = void 0;
|
||||
exports.defaultMergeProps = defaultMergeProps;
|
||||
exports.whenMergePropsIsFunction = whenMergePropsIsFunction;
|
||||
exports.whenMergePropsIsOmitted = whenMergePropsIsOmitted;
|
||||
exports.wrapMergePropsFunc = wrapMergePropsFunc;
|
||||
|
||||
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
||||
|
||||
var _verifyPlainObject = _interopRequireDefault(require("../utils/verifyPlainObject"));
|
||||
|
||||
function defaultMergeProps(stateProps, dispatchProps, ownProps) {
|
||||
return (0, _extends2["default"])({}, ownProps, stateProps, dispatchProps);
|
||||
}
|
||||
|
||||
function wrapMergePropsFunc(mergeProps) {
|
||||
return function initMergePropsProxy(dispatch, _ref) {
|
||||
var displayName = _ref.displayName,
|
||||
pure = _ref.pure,
|
||||
areMergedPropsEqual = _ref.areMergedPropsEqual;
|
||||
var hasRunOnce = false;
|
||||
var mergedProps;
|
||||
return function mergePropsProxy(stateProps, dispatchProps, ownProps) {
|
||||
var nextMergedProps = mergeProps(stateProps, dispatchProps, ownProps);
|
||||
|
||||
if (hasRunOnce) {
|
||||
if (!pure || !areMergedPropsEqual(nextMergedProps, mergedProps)) mergedProps = nextMergedProps;
|
||||
} else {
|
||||
hasRunOnce = true;
|
||||
mergedProps = nextMergedProps;
|
||||
if (process.env.NODE_ENV !== 'production') (0, _verifyPlainObject["default"])(mergedProps, displayName, 'mergeProps');
|
||||
}
|
||||
|
||||
return mergedProps;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
function whenMergePropsIsFunction(mergeProps) {
|
||||
return typeof mergeProps === 'function' ? wrapMergePropsFunc(mergeProps) : undefined;
|
||||
}
|
||||
|
||||
function whenMergePropsIsOmitted(mergeProps) {
|
||||
return !mergeProps ? function () {
|
||||
return defaultMergeProps;
|
||||
} : undefined;
|
||||
}
|
||||
|
||||
var _default = [whenMergePropsIsFunction, whenMergePropsIsOmitted];
|
||||
exports["default"] = _default;
|
||||
101
node_modules/react-redux/lib/connect/selectorFactory.js
generated
vendored
Normal file
101
node_modules/react-redux/lib/connect/selectorFactory.js
generated
vendored
Normal file
@@ -0,0 +1,101 @@
|
||||
"use strict";
|
||||
|
||||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"];
|
||||
|
||||
exports.__esModule = true;
|
||||
exports["default"] = finalPropsSelectorFactory;
|
||||
exports.impureFinalPropsSelectorFactory = impureFinalPropsSelectorFactory;
|
||||
exports.pureFinalPropsSelectorFactory = pureFinalPropsSelectorFactory;
|
||||
|
||||
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
||||
|
||||
var _verifySubselectors = _interopRequireDefault(require("./verifySubselectors"));
|
||||
|
||||
var _excluded = ["initMapStateToProps", "initMapDispatchToProps", "initMergeProps"];
|
||||
|
||||
function impureFinalPropsSelectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch) {
|
||||
return function impureFinalPropsSelector(state, ownProps) {
|
||||
return mergeProps(mapStateToProps(state, ownProps), mapDispatchToProps(dispatch, ownProps), ownProps);
|
||||
};
|
||||
}
|
||||
|
||||
function pureFinalPropsSelectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, _ref) {
|
||||
var areStatesEqual = _ref.areStatesEqual,
|
||||
areOwnPropsEqual = _ref.areOwnPropsEqual,
|
||||
areStatePropsEqual = _ref.areStatePropsEqual;
|
||||
var hasRunAtLeastOnce = false;
|
||||
var state;
|
||||
var ownProps;
|
||||
var stateProps;
|
||||
var dispatchProps;
|
||||
var mergedProps;
|
||||
|
||||
function handleFirstCall(firstState, firstOwnProps) {
|
||||
state = firstState;
|
||||
ownProps = firstOwnProps;
|
||||
stateProps = mapStateToProps(state, ownProps);
|
||||
dispatchProps = mapDispatchToProps(dispatch, ownProps);
|
||||
mergedProps = mergeProps(stateProps, dispatchProps, ownProps);
|
||||
hasRunAtLeastOnce = true;
|
||||
return mergedProps;
|
||||
}
|
||||
|
||||
function handleNewPropsAndNewState() {
|
||||
stateProps = mapStateToProps(state, ownProps);
|
||||
if (mapDispatchToProps.dependsOnOwnProps) dispatchProps = mapDispatchToProps(dispatch, ownProps);
|
||||
mergedProps = mergeProps(stateProps, dispatchProps, ownProps);
|
||||
return mergedProps;
|
||||
}
|
||||
|
||||
function handleNewProps() {
|
||||
if (mapStateToProps.dependsOnOwnProps) stateProps = mapStateToProps(state, ownProps);
|
||||
if (mapDispatchToProps.dependsOnOwnProps) dispatchProps = mapDispatchToProps(dispatch, ownProps);
|
||||
mergedProps = mergeProps(stateProps, dispatchProps, ownProps);
|
||||
return mergedProps;
|
||||
}
|
||||
|
||||
function handleNewState() {
|
||||
var nextStateProps = mapStateToProps(state, ownProps);
|
||||
var statePropsChanged = !areStatePropsEqual(nextStateProps, stateProps);
|
||||
stateProps = nextStateProps;
|
||||
if (statePropsChanged) mergedProps = mergeProps(stateProps, dispatchProps, ownProps);
|
||||
return mergedProps;
|
||||
}
|
||||
|
||||
function handleSubsequentCalls(nextState, nextOwnProps) {
|
||||
var propsChanged = !areOwnPropsEqual(nextOwnProps, ownProps);
|
||||
var stateChanged = !areStatesEqual(nextState, state, nextOwnProps, ownProps);
|
||||
state = nextState;
|
||||
ownProps = nextOwnProps;
|
||||
if (propsChanged && stateChanged) return handleNewPropsAndNewState();
|
||||
if (propsChanged) return handleNewProps();
|
||||
if (stateChanged) return handleNewState();
|
||||
return mergedProps;
|
||||
}
|
||||
|
||||
return function pureFinalPropsSelector(nextState, nextOwnProps) {
|
||||
return hasRunAtLeastOnce ? handleSubsequentCalls(nextState, nextOwnProps) : handleFirstCall(nextState, nextOwnProps);
|
||||
};
|
||||
} // TODO: Add more comments
|
||||
// If pure is true, the selector returned by selectorFactory will memoize its results,
|
||||
// allowing connectAdvanced's shouldComponentUpdate to return false if final
|
||||
// props have not changed. If false, the selector will always return a new
|
||||
// object and shouldComponentUpdate will always return true.
|
||||
|
||||
|
||||
function finalPropsSelectorFactory(dispatch, _ref2) {
|
||||
var initMapStateToProps = _ref2.initMapStateToProps,
|
||||
initMapDispatchToProps = _ref2.initMapDispatchToProps,
|
||||
initMergeProps = _ref2.initMergeProps,
|
||||
options = (0, _objectWithoutPropertiesLoose2["default"])(_ref2, _excluded);
|
||||
var mapStateToProps = initMapStateToProps(dispatch, options);
|
||||
var mapDispatchToProps = initMapDispatchToProps(dispatch, options);
|
||||
var mergeProps = initMergeProps(dispatch, options);
|
||||
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
(0, _verifySubselectors["default"])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);
|
||||
}
|
||||
|
||||
var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;
|
||||
return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);
|
||||
}
|
||||
24
node_modules/react-redux/lib/connect/verifySubselectors.js
generated
vendored
Normal file
24
node_modules/react-redux/lib/connect/verifySubselectors.js
generated
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
"use strict";
|
||||
|
||||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"];
|
||||
|
||||
exports.__esModule = true;
|
||||
exports["default"] = verifySubselectors;
|
||||
|
||||
var _warning = _interopRequireDefault(require("../utils/warning"));
|
||||
|
||||
function verify(selector, methodName, displayName) {
|
||||
if (!selector) {
|
||||
throw new Error("Unexpected value for " + methodName + " in " + displayName + ".");
|
||||
} else if (methodName === 'mapStateToProps' || methodName === 'mapDispatchToProps') {
|
||||
if (!Object.prototype.hasOwnProperty.call(selector, 'dependsOnOwnProps')) {
|
||||
(0, _warning["default"])("The selector for " + methodName + " of " + displayName + " did not specify a value for dependsOnOwnProps.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function verifySubselectors(mapStateToProps, mapDispatchToProps, mergeProps, displayName) {
|
||||
verify(mapStateToProps, 'mapStateToProps', displayName);
|
||||
verify(mapDispatchToProps, 'mapDispatchToProps', displayName);
|
||||
verify(mergeProps, 'mergeProps', displayName);
|
||||
}
|
||||
76
node_modules/react-redux/lib/connect/wrapMapToProps.js
generated
vendored
Normal file
76
node_modules/react-redux/lib/connect/wrapMapToProps.js
generated
vendored
Normal file
@@ -0,0 +1,76 @@
|
||||
"use strict";
|
||||
|
||||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"];
|
||||
|
||||
exports.__esModule = true;
|
||||
exports.getDependsOnOwnProps = getDependsOnOwnProps;
|
||||
exports.wrapMapToPropsConstant = wrapMapToPropsConstant;
|
||||
exports.wrapMapToPropsFunc = wrapMapToPropsFunc;
|
||||
|
||||
var _verifyPlainObject = _interopRequireDefault(require("../utils/verifyPlainObject"));
|
||||
|
||||
function wrapMapToPropsConstant(getConstant) {
|
||||
return function initConstantSelector(dispatch, options) {
|
||||
var constant = getConstant(dispatch, options);
|
||||
|
||||
function constantSelector() {
|
||||
return constant;
|
||||
}
|
||||
|
||||
constantSelector.dependsOnOwnProps = false;
|
||||
return constantSelector;
|
||||
};
|
||||
} // dependsOnOwnProps is used by createMapToPropsProxy to determine whether to pass props as args
|
||||
// to the mapToProps function being wrapped. It is also used by makePurePropsSelector to determine
|
||||
// whether mapToProps needs to be invoked when props have changed.
|
||||
//
|
||||
// A length of one signals that mapToProps does not depend on props from the parent component.
|
||||
// A length of zero is assumed to mean mapToProps is getting args via arguments or ...args and
|
||||
// therefore not reporting its length accurately..
|
||||
|
||||
|
||||
function getDependsOnOwnProps(mapToProps) {
|
||||
return mapToProps.dependsOnOwnProps !== null && mapToProps.dependsOnOwnProps !== undefined ? Boolean(mapToProps.dependsOnOwnProps) : mapToProps.length !== 1;
|
||||
} // Used by whenMapStateToPropsIsFunction and whenMapDispatchToPropsIsFunction,
|
||||
// this function wraps mapToProps in a proxy function which does several things:
|
||||
//
|
||||
// * Detects whether the mapToProps function being called depends on props, which
|
||||
// is used by selectorFactory to decide if it should reinvoke on props changes.
|
||||
//
|
||||
// * On first call, handles mapToProps if returns another function, and treats that
|
||||
// new function as the true mapToProps for subsequent calls.
|
||||
//
|
||||
// * On first call, verifies the first result is a plain object, in order to warn
|
||||
// the developer that their mapToProps function is not returning a valid result.
|
||||
//
|
||||
|
||||
|
||||
function wrapMapToPropsFunc(mapToProps, methodName) {
|
||||
return function initProxySelector(dispatch, _ref) {
|
||||
var displayName = _ref.displayName;
|
||||
|
||||
var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {
|
||||
return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);
|
||||
}; // allow detectFactoryAndVerify to get ownProps
|
||||
|
||||
|
||||
proxy.dependsOnOwnProps = true;
|
||||
|
||||
proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {
|
||||
proxy.mapToProps = mapToProps;
|
||||
proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);
|
||||
var props = proxy(stateOrDispatch, ownProps);
|
||||
|
||||
if (typeof props === 'function') {
|
||||
proxy.mapToProps = props;
|
||||
proxy.dependsOnOwnProps = getDependsOnOwnProps(props);
|
||||
props = proxy(stateOrDispatch, ownProps);
|
||||
}
|
||||
|
||||
if (process.env.NODE_ENV !== 'production') (0, _verifyPlainObject["default"])(props, displayName, methodName);
|
||||
return props;
|
||||
};
|
||||
|
||||
return proxy;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user