react-redux
Advanced tools
Comparing version 4.0.0 to 4.0.1
@@ -61,12 +61,20 @@ (function webpackUniversalModuleDefinition(root, factory) { | ||
function _interopRequire(obj) { return obj && obj.__esModule ? obj['default'] : obj; } | ||
var _Provider = __webpack_require__(3); | ||
var _componentsProvider = __webpack_require__(3); | ||
Object.defineProperty(exports, 'Provider', { | ||
enumerable: true, | ||
get: function get() { | ||
return _Provider.default; | ||
} | ||
}); | ||
exports.Provider = _interopRequire(_componentsProvider); | ||
var _connect = __webpack_require__(4); | ||
var _componentsConnect = __webpack_require__(4); | ||
Object.defineProperty(exports, 'connect', { | ||
enumerable: true, | ||
get: function get() { | ||
return _connect.default; | ||
} | ||
}); | ||
exports.connect = _interopRequire(_componentsConnect); | ||
/***/ }, | ||
@@ -88,3 +96,3 @@ /* 1 */ | ||
exports['default'] = _react.PropTypes.shape({ | ||
exports.default = _react.PropTypes.shape({ | ||
subscribe: _react.PropTypes.func.isRequired, | ||
@@ -94,3 +102,2 @@ dispatch: _react.PropTypes.func.isRequired, | ||
}); | ||
module.exports = exports['default']; | ||
@@ -104,15 +111,18 @@ /***/ }, | ||
exports.__esModule = true; | ||
exports.default = undefined; | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } | ||
var _react = __webpack_require__(1); | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } | ||
var _storeShape = __webpack_require__(2); | ||
function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } | ||
var _storeShape2 = _interopRequireDefault(_storeShape); | ||
var _react = __webpack_require__(1); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
var _utilsStoreShape = __webpack_require__(2); | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
var _utilsStoreShape2 = _interopRequireDefault(_utilsStoreShape); | ||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } | ||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } | ||
var didWarnAboutReceivingStore = false; | ||
@@ -139,4 +149,6 @@ function warnAboutReceivingStore() { | ||
_Component.call(this, props, context); | ||
this.store = props.store; | ||
var _this = _possibleConstructorReturn(this, _Component.call(this, props, context)); | ||
_this.store = props.store; | ||
return _this; | ||
} | ||
@@ -162,12 +174,11 @@ | ||
exports['default'] = Provider; | ||
exports.default = Provider; | ||
Provider.propTypes = { | ||
store: _utilsStoreShape2['default'].isRequired, | ||
store: _storeShape2.default.isRequired, | ||
children: _react.PropTypes.element.isRequired | ||
}; | ||
Provider.childContextTypes = { | ||
store: _utilsStoreShape2['default'].isRequired | ||
store: _storeShape2.default.isRequired | ||
}; | ||
module.exports = exports['default']; | ||
@@ -180,14 +191,7 @@ /***/ }, | ||
exports.__esModule = true; | ||
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | ||
exports['default'] = connect; | ||
exports.__esModule = true; | ||
exports.default = connect; | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } | ||
function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } | ||
var _react = __webpack_require__(1); | ||
@@ -197,17 +201,17 @@ | ||
var _utilsStoreShape = __webpack_require__(2); | ||
var _storeShape = __webpack_require__(2); | ||
var _utilsStoreShape2 = _interopRequireDefault(_utilsStoreShape); | ||
var _storeShape2 = _interopRequireDefault(_storeShape); | ||
var _utilsShallowEqual = __webpack_require__(6); | ||
var _shallowEqual = __webpack_require__(6); | ||
var _utilsShallowEqual2 = _interopRequireDefault(_utilsShallowEqual); | ||
var _shallowEqual2 = _interopRequireDefault(_shallowEqual); | ||
var _utilsIsPlainObject = __webpack_require__(5); | ||
var _isPlainObject = __webpack_require__(5); | ||
var _utilsIsPlainObject2 = _interopRequireDefault(_utilsIsPlainObject); | ||
var _isPlainObject2 = _interopRequireDefault(_isPlainObject); | ||
var _utilsWrapActionCreators = __webpack_require__(7); | ||
var _wrapActionCreators = __webpack_require__(7); | ||
var _utilsWrapActionCreators2 = _interopRequireDefault(_utilsWrapActionCreators); | ||
var _wrapActionCreators2 = _interopRequireDefault(_wrapActionCreators); | ||
@@ -222,2 +226,10 @@ var _hoistNonReactStatics = __webpack_require__(8); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } | ||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } | ||
var defaultMapStateToProps = function defaultMapStateToProps() { | ||
@@ -245,3 +257,3 @@ return {}; | ||
var finalMapStateToProps = mapStateToProps || defaultMapStateToProps; | ||
var finalMapDispatchToProps = _utilsIsPlainObject2['default'](mapDispatchToProps) ? _utilsWrapActionCreators2['default'](mapDispatchToProps) : mapDispatchToProps || defaultMapDispatchToProps; | ||
var finalMapDispatchToProps = (0, _isPlainObject2.default)(mapDispatchToProps) ? (0, _wrapActionCreators2.default)(mapDispatchToProps) : mapDispatchToProps || defaultMapDispatchToProps; | ||
var finalMergeProps = mergeProps || defaultMergeProps; | ||
@@ -256,2 +268,3 @@ var shouldUpdateStateProps = finalMapStateToProps.length > 1; | ||
// Helps track hot reloading. | ||
var version = nextVersion++; | ||
@@ -263,3 +276,3 @@ | ||
_invariant2['default'](_utilsIsPlainObject2['default'](stateProps), '`mapStateToProps` must return an object. Instead received %s.', stateProps); | ||
(0, _invariant2.default)((0, _isPlainObject2.default)(stateProps), '`mapStateToProps` must return an object. Instead received %s.', stateProps); | ||
return stateProps; | ||
@@ -273,3 +286,3 @@ } | ||
_invariant2['default'](_utilsIsPlainObject2['default'](dispatchProps), '`mapDispatchToProps` must return an object. Instead received %s.', dispatchProps); | ||
(0, _invariant2.default)((0, _isPlainObject2.default)(dispatchProps), '`mapDispatchToProps` must return an object. Instead received %s.', dispatchProps); | ||
return dispatchProps; | ||
@@ -280,3 +293,3 @@ } | ||
var mergedProps = finalMergeProps(stateProps, dispatchProps, parentProps); | ||
_invariant2['default'](_utilsIsPlainObject2['default'](mergedProps), '`mergeProps` must return an object. Instead received %s.', mergedProps); | ||
(0, _invariant2.default)((0, _isPlainObject2.default)(mergedProps), '`mergeProps` must return an object. Instead received %s.', mergedProps); | ||
return mergedProps; | ||
@@ -298,3 +311,3 @@ } | ||
var storeChanged = nextState.storeState !== this.state.storeState; | ||
var propsChanged = !_utilsShallowEqual2['default'](nextProps, this.props); | ||
var propsChanged = !(0, _shallowEqual2.default)(nextProps, this.props); | ||
var mapStateProducedChange = false; | ||
@@ -322,12 +335,14 @@ var dispatchPropsChanged = false; | ||
_Component.call(this, props, context); | ||
this.version = version; | ||
this.store = props.store || context.store; | ||
var _this = _possibleConstructorReturn(this, _Component.call(this, props, context)); | ||
_invariant2['default'](this.store, 'Could not find "store" in either the context or ' + ('props of "' + this.constructor.displayName + '". ') + 'Either wrap the root component in a <Provider>, ' + ('or explicitly pass "store" as a prop to "' + this.constructor.displayName + '".')); | ||
_this.version = version; | ||
_this.store = props.store || context.store; | ||
this.stateProps = computeStateProps(this.store, props); | ||
this.dispatchProps = computeDispatchProps(this.store, props); | ||
this.state = { storeState: null }; | ||
this.updateState(); | ||
(0, _invariant2.default)(_this.store, 'Could not find "store" in either the context or ' + ('props of "' + _this.constructor.displayName + '". ') + 'Either wrap the root component in a <Provider>, ' + ('or explicitly pass "store" as a prop to "' + _this.constructor.displayName + '".')); | ||
_this.stateProps = computeStateProps(_this.store, props); | ||
_this.dispatchProps = computeDispatchProps(_this.store, props); | ||
_this.state = { storeState: null }; | ||
_this.updateState(); | ||
return _this; | ||
} | ||
@@ -345,3 +360,3 @@ | ||
var nextStateProps = computeStateProps(this.store, props); | ||
if (_utilsShallowEqual2['default'](nextStateProps, this.stateProps)) { | ||
if ((0, _shallowEqual2.default)(nextStateProps, this.stateProps)) { | ||
return false; | ||
@@ -358,3 +373,3 @@ } | ||
var nextDispatchProps = computeDispatchProps(this.store, props); | ||
if (_utilsShallowEqual2['default'](nextDispatchProps, this.dispatchProps)) { | ||
if ((0, _shallowEqual2.default)(nextDispatchProps, this.dispatchProps)) { | ||
return false; | ||
@@ -410,3 +425,3 @@ } | ||
Connect.prototype.getWrappedInstance = function getWrappedInstance() { | ||
_invariant2['default'](withRef, 'To access the wrapped instance, you need to specify ' + '{ withRef: true } as the fourth argument of the connect() call.'); | ||
(0, _invariant2.default)(withRef, 'To access the wrapped instance, you need to specify ' + '{ withRef: true } as the fourth argument of the connect() call.'); | ||
@@ -418,3 +433,3 @@ return this.refs.wrappedInstance; | ||
var ref = withRef ? 'wrappedInstance' : null; | ||
return _react2['default'].createElement(WrappedComponent, _extends({}, this.nextState, { ref: ref })); | ||
return _react2.default.createElement(WrappedComponent, _extends({}, this.nextState, { ref: ref })); | ||
}; | ||
@@ -428,6 +443,6 @@ | ||
Connect.contextTypes = { | ||
store: _utilsStoreShape2['default'] | ||
store: _storeShape2.default | ||
}; | ||
Connect.propTypes = { | ||
store: _utilsStoreShape2['default'] | ||
store: _storeShape2.default | ||
}; | ||
@@ -452,8 +467,6 @@ | ||
return _hoistNonReactStatics2['default'](Connect, WrappedComponent); | ||
return (0, _hoistNonReactStatics2.default)(Connect, WrappedComponent); | ||
}; | ||
} | ||
module.exports = exports['default']; | ||
/***/ }, | ||
@@ -466,3 +479,6 @@ /* 5 */ | ||
exports.__esModule = true; | ||
exports['default'] = isPlainObject; | ||
exports.default = isPlainObject; | ||
function _typeof(obj) { return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj; } | ||
var fnToString = function fnToString(fn) { | ||
@@ -476,5 +492,4 @@ return Function.prototype.toString.call(fn); | ||
*/ | ||
function isPlainObject(obj) { | ||
if (!obj || typeof obj !== 'object') { | ||
if (!obj || (typeof obj === 'undefined' ? 'undefined' : _typeof(obj)) !== 'object') { | ||
return false; | ||
@@ -494,4 +509,2 @@ } | ||
module.exports = exports['default']; | ||
/***/ }, | ||
@@ -504,4 +517,3 @@ /* 6 */ | ||
exports.__esModule = true; | ||
exports["default"] = shallowEqual; | ||
exports.default = shallowEqual; | ||
function shallowEqual(objA, objB) { | ||
@@ -530,4 +542,2 @@ if (objA === objB) { | ||
module.exports = exports["default"]; | ||
/***/ }, | ||
@@ -540,3 +550,3 @@ /* 7 */ | ||
exports.__esModule = true; | ||
exports['default'] = wrapActionCreators; | ||
exports.default = wrapActionCreators; | ||
@@ -547,8 +557,6 @@ var _redux = __webpack_require__(10); | ||
return function (dispatch) { | ||
return _redux.bindActionCreators(actionCreators, dispatch); | ||
return (0, _redux.bindActionCreators)(actionCreators, dispatch); | ||
}; | ||
} | ||
module.exports = exports['default']; | ||
/***/ }, | ||
@@ -607,4 +615,2 @@ /* 8 */ | ||
* of patent rights can be found in the PATENTS file in the same directory. | ||
* | ||
* @providesModule invariant | ||
*/ | ||
@@ -643,5 +649,5 @@ | ||
error = new Error( | ||
'Invariant Violation: ' + | ||
format.replace(/%s/g, function() { return args[argIndex++]; }) | ||
); | ||
error.name = 'Invariant Violation'; | ||
} | ||
@@ -648,0 +654,0 @@ |
@@ -1,1 +0,1 @@ | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react"),require("redux")):"function"==typeof define&&define.amd?define(["react","redux"],e):"object"==typeof exports?exports.ReactRedux=e(require("react"),require("redux")):t.ReactRedux=e(t.React,t.Redux)}(this,function(t,e){return function(t){function e(o){if(r[o])return r[o].exports;var n=r[o]={exports:{},id:o,loaded:!1};return t[o].call(n.exports,n,n.exports,e),n.loaded=!0,n.exports}var r={};return e.m=t,e.c=r,e.p="",e(0)}([function(t,e,r){"use strict";function o(t){return t&&t.__esModule?t.default:t}e.__esModule=!0;var n=r(3);e.Provider=o(n);var s=r(4);e.connect=o(s)},function(e,r){e.exports=t},function(t,e,r){"use strict";e.__esModule=!0;var o=r(1);e.default=o.PropTypes.shape({subscribe:o.PropTypes.func.isRequired,dispatch:o.PropTypes.func.isRequired,getState:o.PropTypes.func.isRequired}),t.exports=e.default},function(t,e,r){"use strict";function o(t){return t&&t.__esModule?t:{"default":t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function u(){c||(c=!0,console.error("<Provider> does not support changing `store` on the fly. It is most likely that you see this error because you updated to Redux 2.x and React Redux 2.x which no longer hot reload reducers automatically. See https://github.com/rackt/react-redux/releases/tag/v2.0.0 for the migration instructions."))}e.__esModule=!0;var i=r(1),a=r(2),p=o(a),c=!1,f=function(t){function e(r,o){n(this,e),t.call(this,r,o),this.store=r.store}return s(e,t),e.prototype.getChildContext=function(){return{store:this.store}},e.prototype.componentWillReceiveProps=function(t){var e=this.store,r=t.store;e!==r&&u()},e.prototype.render=function(){var t=this.props.children;return i.Children.only(t)},e}(i.Component);e.default=f,f.propTypes={store:p.default.isRequired,children:i.PropTypes.element.isRequired},f.childContextTypes={store:p.default.isRequired},t.exports=e.default},function(t,e,r){"use strict";function o(t){return t&&t.__esModule?t:{"default":t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function u(t){return t.displayName||t.name||"Component"}function i(t,e,r){function o(t,e){var r=t.getState(),o=T?b(r,e):b(r);return _.default(m.default(o),"`mapStateToProps` must return an object. Instead received %s.",o),o}function i(t,e){var r=t.dispatch,o=C?v(r,e):v(r);return _.default(m.default(o),"`mapDispatchToProps` must return an object. Instead received %s.",o),o}function f(t,e,r){var o=P(t,e,r);return _.default(m.default(o),"`mergeProps` must return an object. Instead received %s.",o),o}var d=arguments.length<=3||void 0===arguments[3]?{}:arguments[3],y=Boolean(t),b=t||S,v=m.default(e)?g.default(e):e||w,P=r||O,T=b.length>1,C=v.length>1,R=d.pure,M=void 0===R?!0:R,q=d.withRef,E=void 0===q?!1:q,I=j++;return function(t){var e=function(e){function r(t,s){n(this,r),e.call(this,t,s),this.version=I,this.store=t.store||s.store,_.default(this.store,'Could not find "store" in either the context or '+('props of "'+this.constructor.displayName+'". ')+"Either wrap the root component in a <Provider>, "+('or explicitly pass "store" as a prop to "'+this.constructor.displayName+'".')),this.stateProps=o(this.store,t),this.dispatchProps=i(this.store,t),this.state={storeState:null},this.updateState()}return s(r,e),r.prototype.shouldComponentUpdate=function(t,e){if(!M)return this.updateStateProps(t),this.updateDispatchProps(t),this.updateState(t),!0;var r=e.storeState!==this.state.storeState,o=!h.default(t,this.props),n=!1,s=!1;return(r||o&&T)&&(n=this.updateStateProps(t)),o&&C&&(s=this.updateDispatchProps(t)),o||n||s?(this.updateState(t),!0):!1},r.prototype.computeNextState=function(){var t=arguments.length<=0||void 0===arguments[0]?this.props:arguments[0];return f(this.stateProps,this.dispatchProps,t)},r.prototype.updateStateProps=function(){var t=arguments.length<=0||void 0===arguments[0]?this.props:arguments[0],e=o(this.store,t);return h.default(e,this.stateProps)?!1:(this.stateProps=e,!0)},r.prototype.updateDispatchProps=function(){var t=arguments.length<=0||void 0===arguments[0]?this.props:arguments[0],e=i(this.store,t);return h.default(e,this.dispatchProps)?!1:(this.dispatchProps=e,!0)},r.prototype.updateState=function(){var t=arguments.length<=0||void 0===arguments[0]?this.props:arguments[0];this.nextState=this.computeNextState(t)},r.prototype.isSubscribed=function(){return"function"==typeof this.unsubscribe},r.prototype.trySubscribe=function(){y&&!this.unsubscribe&&(this.unsubscribe=this.store.subscribe(this.handleChange.bind(this)),this.handleChange())},r.prototype.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null)},r.prototype.componentDidMount=function(){this.trySubscribe()},r.prototype.componentWillUnmount=function(){this.tryUnsubscribe()},r.prototype.handleChange=function(){this.unsubscribe&&this.setState({storeState:this.store.getState()})},r.prototype.getWrappedInstance=function(){return _.default(E,"To access the wrapped instance, you need to specify { withRef: true } as the fourth argument of the connect() call."),this.refs.wrappedInstance},r.prototype.render=function(){var e=E?"wrappedInstance":null;return c.default.createElement(t,a({},this.nextState,{ref:e}))},r}(p.Component);return e.displayName="Connect("+u(t)+")",e.WrappedComponent=t,e.contextTypes={store:l.default},e.propTypes={store:l.default},x.default(e,t)}}e.__esModule=!0;var a=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t};e.default=i;var p=r(1),c=o(p),f=r(2),l=o(f),d=r(6),h=o(d),y=r(5),m=o(y),b=r(7),g=o(b),v=r(8),x=o(v),P=r(9),_=o(P),S=function(){return{}},w=function(t){return{dispatch:t}},O=function(t,e,r){return a({},r,t,e)},j=0;t.exports=e.default},function(t,e){"use strict";function r(t){if(!t||"object"!=typeof t)return!1;var e="function"==typeof t.constructor?Object.getPrototypeOf(t):Object.prototype;if(null===e)return!0;var r=e.constructor;return"function"==typeof r&&r instanceof r&&o(r)===o(Object)}e.__esModule=!0,e.default=r;var o=function(t){return Function.prototype.toString.call(t)};t.exports=e.default},function(t,e){"use strict";function r(t,e){if(t===e)return!0;var r=Object.keys(t),o=Object.keys(e);if(r.length!==o.length)return!1;for(var n=Object.prototype.hasOwnProperty,s=0;s<r.length;s++)if(!n.call(e,r[s])||t[r[s]]!==e[r[s]])return!1;return!0}e.__esModule=!0,e.default=r,t.exports=e.default},function(t,e,r){"use strict";function o(t){return function(e){return n.bindActionCreators(t,e)}}e.__esModule=!0,e.default=o;var n=r(10);t.exports=e.default},function(t,e){"use strict";var r={childContextTypes:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,arguments:!0,arity:!0};t.exports=function(t,e){for(var n=Object.getOwnPropertyNames(e),s=0;s<n.length;++s)r[n[s]]||o[n[s]]||(t[n[s]]=e[n[s]]);return t}},function(t,e,r){"use strict";var o=function(t,e,r,o,n,s,u,i){if(!t){var a;if(void 0===e)a=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var p=[r,o,n,s,u,i],c=0;a=new Error("Invariant Violation: "+e.replace(/%s/g,function(){return p[c++]}))}throw a.framesToPop=1,a}};t.exports=o},function(t,r){t.exports=e}])}); | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react"),require("redux")):"function"==typeof define&&define.amd?define(["react","redux"],e):"object"==typeof exports?exports.ReactRedux=e(require("react"),require("redux")):t.ReactRedux=e(t.React,t.Redux)}(this,function(t,e){return function(t){function e(n){if(r[n])return r[n].exports;var o=r[n]={exports:{},id:n,loaded:!1};return t[n].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var r={};return e.m=t,e.c=r,e.p="",e(0)}([function(t,e,r){"use strict";e.__esModule=!0;var n=r(3);Object.defineProperty(e,"Provider",{enumerable:!0,get:function(){return n.default}});var o=r(4);Object.defineProperty(e,"connect",{enumerable:!0,get:function(){return o.default}})},function(e,r){e.exports=t},function(t,e,r){"use strict";e.__esModule=!0;var n=r(1);e.default=n.PropTypes.shape({subscribe:n.PropTypes.func.isRequired,dispatch:n.PropTypes.func.isRequired,getState:n.PropTypes.func.isRequired})},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function u(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function i(){f||(f=!0,console.error("<Provider> does not support changing `store` on the fly. It is most likely that you see this error because you updated to Redux 2.x and React Redux 2.x which no longer hot reload reducers automatically. See https://github.com/rackt/react-redux/releases/tag/v2.0.0 for the migration instructions."))}e.__esModule=!0,e.default=void 0;var a=r(1),c=r(2),p=n(c),f=!1,l=function(t){function e(r,n){o(this,e);var u=s(this,t.call(this,r,n));return u.store=r.store,u}return u(e,t),e.prototype.getChildContext=function(){return{store:this.store}},e.prototype.componentWillReceiveProps=function(t){var e=this.store,r=t.store;e!==r&&i()},e.prototype.render=function(){var t=this.props.children;return a.Children.only(t)},e}(a.Component);e.default=l,l.propTypes={store:p.default.isRequired,children:a.PropTypes.element.isRequired},l.childContextTypes={store:p.default.isRequired}},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function u(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function i(t){return t.displayName||t.name||"Component"}function a(t,e,r){function n(t,e){var r=t.getState(),n=T?v(r,e):v(r);return(0,w.default)((0,m.default)(n),"`mapStateToProps` must return an object. Instead received %s.",n),n}function a(t,e){var r=t.dispatch,n=C?x(r,e):x(r);return(0,w.default)((0,m.default)(n),"`mapDispatchToProps` must return an object. Instead received %s.",n),n}function l(t,e,r){var n=S(t,e,r);return(0,w.default)((0,m.default)(n),"`mergeProps` must return an object. Instead received %s.",n),n}var h=arguments.length<=3||void 0===arguments[3]?{}:arguments[3],b=Boolean(t),v=t||j,x=(0,m.default)(e)?(0,g.default)(e):e||_,S=r||O,T=v.length>1,C=x.length>1,M=h.pure,q=void 0===M?!0:M,E=h.withRef,I=void 0===E?!1:E,N=R++;return function(t){var e=function(e){function r(t,u){o(this,r);var i=s(this,e.call(this,t,u));return i.version=N,i.store=t.store||u.store,(0,w.default)(i.store,'Could not find "store" in either the context or '+('props of "'+i.constructor.displayName+'". ')+"Either wrap the root component in a <Provider>, "+('or explicitly pass "store" as a prop to "'+i.constructor.displayName+'".')),i.stateProps=n(i.store,t),i.dispatchProps=a(i.store,t),i.state={storeState:null},i.updateState(),i}return u(r,e),r.prototype.shouldComponentUpdate=function(t,e){if(!q)return this.updateStateProps(t),this.updateDispatchProps(t),this.updateState(t),!0;var r=e.storeState!==this.state.storeState,n=!(0,y.default)(t,this.props),o=!1,s=!1;return(r||n&&T)&&(o=this.updateStateProps(t)),n&&C&&(s=this.updateDispatchProps(t)),n||o||s?(this.updateState(t),!0):!1},r.prototype.computeNextState=function(){var t=arguments.length<=0||void 0===arguments[0]?this.props:arguments[0];return l(this.stateProps,this.dispatchProps,t)},r.prototype.updateStateProps=function(){var t=arguments.length<=0||void 0===arguments[0]?this.props:arguments[0],e=n(this.store,t);return(0,y.default)(e,this.stateProps)?!1:(this.stateProps=e,!0)},r.prototype.updateDispatchProps=function(){var t=arguments.length<=0||void 0===arguments[0]?this.props:arguments[0],e=a(this.store,t);return(0,y.default)(e,this.dispatchProps)?!1:(this.dispatchProps=e,!0)},r.prototype.updateState=function(){var t=arguments.length<=0||void 0===arguments[0]?this.props:arguments[0];this.nextState=this.computeNextState(t)},r.prototype.isSubscribed=function(){return"function"==typeof this.unsubscribe},r.prototype.trySubscribe=function(){b&&!this.unsubscribe&&(this.unsubscribe=this.store.subscribe(this.handleChange.bind(this)),this.handleChange())},r.prototype.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null)},r.prototype.componentDidMount=function(){this.trySubscribe()},r.prototype.componentWillUnmount=function(){this.tryUnsubscribe()},r.prototype.handleChange=function(){this.unsubscribe&&this.setState({storeState:this.store.getState()})},r.prototype.getWrappedInstance=function(){return(0,w.default)(I,"To access the wrapped instance, you need to specify { withRef: true } as the fourth argument of the connect() call."),this.refs.wrappedInstance},r.prototype.render=function(){var e=I?"wrappedInstance":null;return f.default.createElement(t,c({},this.nextState,{ref:e}))},r}(p.Component);return e.displayName="Connect("+i(t)+")",e.WrappedComponent=t,e.contextTypes={store:d.default},e.propTypes={store:d.default},(0,P.default)(e,t)}}var c=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t};e.__esModule=!0,e.default=a;var p=r(1),f=n(p),l=r(2),d=n(l),h=r(6),y=n(h),b=r(5),m=n(b),v=r(7),g=n(v),x=r(8),P=n(x),S=r(9),w=n(S),j=function(){return{}},_=function(t){return{dispatch:t}},O=function(t,e,r){return c({},r,t,e)},R=0},function(t,e){"use strict";function r(t){return t&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":typeof t}function n(t){if(!t||"object"!==("undefined"==typeof t?"undefined":r(t)))return!1;var e="function"==typeof t.constructor?Object.getPrototypeOf(t):Object.prototype;if(null===e)return!0;var n=e.constructor;return"function"==typeof n&&n instanceof n&&o(n)===o(Object)}e.__esModule=!0,e.default=n;var o=function(t){return Function.prototype.toString.call(t)}},function(t,e){"use strict";function r(t,e){if(t===e)return!0;var r=Object.keys(t),n=Object.keys(e);if(r.length!==n.length)return!1;for(var o=Object.prototype.hasOwnProperty,s=0;s<r.length;s++)if(!o.call(e,r[s])||t[r[s]]!==e[r[s]])return!1;return!0}e.__esModule=!0,e.default=r},function(t,e,r){"use strict";function n(t){return function(e){return(0,o.bindActionCreators)(t,e)}}e.__esModule=!0,e.default=n;var o=r(10)},function(t,e){"use strict";var r={childContextTypes:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,mixins:!0,propTypes:!0,type:!0},n={name:!0,length:!0,prototype:!0,caller:!0,arguments:!0,arity:!0};t.exports=function(t,e){for(var o=Object.getOwnPropertyNames(e),s=0;s<o.length;++s)r[o[s]]||n[o[s]]||(t[o[s]]=e[o[s]]);return t}},function(t,e,r){"use strict";var n=function(t,e,r,n,o,s,u,i){if(!t){var a;if(void 0===e)a=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[r,n,o,s,u,i],p=0;a=new Error(e.replace(/%s/g,function(){return c[p++]})),a.name="Invariant Violation"}throw a.framesToPop=1,a}};t.exports=n},function(t,r){t.exports=e}])}); |
'use strict'; | ||
exports.__esModule = true; | ||
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | ||
exports['default'] = connect; | ||
exports.__esModule = true; | ||
exports.default = connect; | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } | ||
function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } | ||
var _react = require('react'); | ||
@@ -19,17 +12,17 @@ | ||
var _utilsStoreShape = require('../utils/storeShape'); | ||
var _storeShape = require('../utils/storeShape'); | ||
var _utilsStoreShape2 = _interopRequireDefault(_utilsStoreShape); | ||
var _storeShape2 = _interopRequireDefault(_storeShape); | ||
var _utilsShallowEqual = require('../utils/shallowEqual'); | ||
var _shallowEqual = require('../utils/shallowEqual'); | ||
var _utilsShallowEqual2 = _interopRequireDefault(_utilsShallowEqual); | ||
var _shallowEqual2 = _interopRequireDefault(_shallowEqual); | ||
var _utilsIsPlainObject = require('../utils/isPlainObject'); | ||
var _isPlainObject = require('../utils/isPlainObject'); | ||
var _utilsIsPlainObject2 = _interopRequireDefault(_utilsIsPlainObject); | ||
var _isPlainObject2 = _interopRequireDefault(_isPlainObject); | ||
var _utilsWrapActionCreators = require('../utils/wrapActionCreators'); | ||
var _wrapActionCreators = require('../utils/wrapActionCreators'); | ||
var _utilsWrapActionCreators2 = _interopRequireDefault(_utilsWrapActionCreators); | ||
var _wrapActionCreators2 = _interopRequireDefault(_wrapActionCreators); | ||
@@ -44,2 +37,10 @@ var _hoistNonReactStatics = require('hoist-non-react-statics'); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } | ||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } | ||
var defaultMapStateToProps = function defaultMapStateToProps() { | ||
@@ -67,3 +68,3 @@ return {}; | ||
var finalMapStateToProps = mapStateToProps || defaultMapStateToProps; | ||
var finalMapDispatchToProps = _utilsIsPlainObject2['default'](mapDispatchToProps) ? _utilsWrapActionCreators2['default'](mapDispatchToProps) : mapDispatchToProps || defaultMapDispatchToProps; | ||
var finalMapDispatchToProps = (0, _isPlainObject2.default)(mapDispatchToProps) ? (0, _wrapActionCreators2.default)(mapDispatchToProps) : mapDispatchToProps || defaultMapDispatchToProps; | ||
var finalMergeProps = mergeProps || defaultMergeProps; | ||
@@ -78,2 +79,3 @@ var shouldUpdateStateProps = finalMapStateToProps.length > 1; | ||
// Helps track hot reloading. | ||
var version = nextVersion++; | ||
@@ -85,3 +87,3 @@ | ||
_invariant2['default'](_utilsIsPlainObject2['default'](stateProps), '`mapStateToProps` must return an object. Instead received %s.', stateProps); | ||
(0, _invariant2.default)((0, _isPlainObject2.default)(stateProps), '`mapStateToProps` must return an object. Instead received %s.', stateProps); | ||
return stateProps; | ||
@@ -95,3 +97,3 @@ } | ||
_invariant2['default'](_utilsIsPlainObject2['default'](dispatchProps), '`mapDispatchToProps` must return an object. Instead received %s.', dispatchProps); | ||
(0, _invariant2.default)((0, _isPlainObject2.default)(dispatchProps), '`mapDispatchToProps` must return an object. Instead received %s.', dispatchProps); | ||
return dispatchProps; | ||
@@ -102,3 +104,3 @@ } | ||
var mergedProps = finalMergeProps(stateProps, dispatchProps, parentProps); | ||
_invariant2['default'](_utilsIsPlainObject2['default'](mergedProps), '`mergeProps` must return an object. Instead received %s.', mergedProps); | ||
(0, _invariant2.default)((0, _isPlainObject2.default)(mergedProps), '`mergeProps` must return an object. Instead received %s.', mergedProps); | ||
return mergedProps; | ||
@@ -120,3 +122,3 @@ } | ||
var storeChanged = nextState.storeState !== this.state.storeState; | ||
var propsChanged = !_utilsShallowEqual2['default'](nextProps, this.props); | ||
var propsChanged = !(0, _shallowEqual2.default)(nextProps, this.props); | ||
var mapStateProducedChange = false; | ||
@@ -144,12 +146,14 @@ var dispatchPropsChanged = false; | ||
_Component.call(this, props, context); | ||
this.version = version; | ||
this.store = props.store || context.store; | ||
var _this = _possibleConstructorReturn(this, _Component.call(this, props, context)); | ||
_invariant2['default'](this.store, 'Could not find "store" in either the context or ' + ('props of "' + this.constructor.displayName + '". ') + 'Either wrap the root component in a <Provider>, ' + ('or explicitly pass "store" as a prop to "' + this.constructor.displayName + '".')); | ||
_this.version = version; | ||
_this.store = props.store || context.store; | ||
this.stateProps = computeStateProps(this.store, props); | ||
this.dispatchProps = computeDispatchProps(this.store, props); | ||
this.state = { storeState: null }; | ||
this.updateState(); | ||
(0, _invariant2.default)(_this.store, 'Could not find "store" in either the context or ' + ('props of "' + _this.constructor.displayName + '". ') + 'Either wrap the root component in a <Provider>, ' + ('or explicitly pass "store" as a prop to "' + _this.constructor.displayName + '".')); | ||
_this.stateProps = computeStateProps(_this.store, props); | ||
_this.dispatchProps = computeDispatchProps(_this.store, props); | ||
_this.state = { storeState: null }; | ||
_this.updateState(); | ||
return _this; | ||
} | ||
@@ -167,3 +171,3 @@ | ||
var nextStateProps = computeStateProps(this.store, props); | ||
if (_utilsShallowEqual2['default'](nextStateProps, this.stateProps)) { | ||
if ((0, _shallowEqual2.default)(nextStateProps, this.stateProps)) { | ||
return false; | ||
@@ -180,3 +184,3 @@ } | ||
var nextDispatchProps = computeDispatchProps(this.store, props); | ||
if (_utilsShallowEqual2['default'](nextDispatchProps, this.dispatchProps)) { | ||
if ((0, _shallowEqual2.default)(nextDispatchProps, this.dispatchProps)) { | ||
return false; | ||
@@ -232,3 +236,3 @@ } | ||
Connect.prototype.getWrappedInstance = function getWrappedInstance() { | ||
_invariant2['default'](withRef, 'To access the wrapped instance, you need to specify ' + '{ withRef: true } as the fourth argument of the connect() call.'); | ||
(0, _invariant2.default)(withRef, 'To access the wrapped instance, you need to specify ' + '{ withRef: true } as the fourth argument of the connect() call.'); | ||
@@ -240,3 +244,3 @@ return this.refs.wrappedInstance; | ||
var ref = withRef ? 'wrappedInstance' : null; | ||
return _react2['default'].createElement(WrappedComponent, _extends({}, this.nextState, { ref: ref })); | ||
return _react2.default.createElement(WrappedComponent, _extends({}, this.nextState, { ref: ref })); | ||
}; | ||
@@ -250,6 +254,6 @@ | ||
Connect.contextTypes = { | ||
store: _utilsStoreShape2['default'] | ||
store: _storeShape2.default | ||
}; | ||
Connect.propTypes = { | ||
store: _utilsStoreShape2['default'] | ||
store: _storeShape2.default | ||
}; | ||
@@ -274,6 +278,4 @@ | ||
return _hoistNonReactStatics2['default'](Connect, WrappedComponent); | ||
return (0, _hoistNonReactStatics2.default)(Connect, WrappedComponent); | ||
}; | ||
} | ||
module.exports = exports['default']; | ||
} |
'use strict'; | ||
exports.__esModule = true; | ||
exports.default = undefined; | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } | ||
var _react = require('react'); | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } | ||
var _storeShape = require('../utils/storeShape'); | ||
function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } | ||
var _storeShape2 = _interopRequireDefault(_storeShape); | ||
var _react = require('react'); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
var _utilsStoreShape = require('../utils/storeShape'); | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
var _utilsStoreShape2 = _interopRequireDefault(_utilsStoreShape); | ||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } | ||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } | ||
var didWarnAboutReceivingStore = false; | ||
@@ -38,4 +41,6 @@ function warnAboutReceivingStore() { | ||
_Component.call(this, props, context); | ||
this.store = props.store; | ||
var _this = _possibleConstructorReturn(this, _Component.call(this, props, context)); | ||
_this.store = props.store; | ||
return _this; | ||
} | ||
@@ -61,11 +66,10 @@ | ||
exports['default'] = Provider; | ||
exports.default = Provider; | ||
Provider.propTypes = { | ||
store: _utilsStoreShape2['default'].isRequired, | ||
store: _storeShape2.default.isRequired, | ||
children: _react.PropTypes.element.isRequired | ||
}; | ||
Provider.childContextTypes = { | ||
store: _utilsStoreShape2['default'].isRequired | ||
}; | ||
module.exports = exports['default']; | ||
store: _storeShape2.default.isRequired | ||
}; |
@@ -5,10 +5,18 @@ 'use strict'; | ||
function _interopRequire(obj) { return obj && obj.__esModule ? obj['default'] : obj; } | ||
var _Provider = require('./components/Provider'); | ||
var _componentsProvider = require('./components/Provider'); | ||
Object.defineProperty(exports, 'Provider', { | ||
enumerable: true, | ||
get: function get() { | ||
return _Provider.default; | ||
} | ||
}); | ||
exports.Provider = _interopRequire(_componentsProvider); | ||
var _connect = require('./components/connect'); | ||
var _componentsConnect = require('./components/connect'); | ||
exports.connect = _interopRequire(_componentsConnect); | ||
Object.defineProperty(exports, 'connect', { | ||
enumerable: true, | ||
get: function get() { | ||
return _connect.default; | ||
} | ||
}); |
'use strict'; | ||
exports.__esModule = true; | ||
exports['default'] = isPlainObject; | ||
exports.default = isPlainObject; | ||
function _typeof(obj) { return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj; } | ||
var fnToString = function fnToString(fn) { | ||
@@ -13,5 +16,4 @@ return Function.prototype.toString.call(fn); | ||
*/ | ||
function isPlainObject(obj) { | ||
if (!obj || typeof obj !== 'object') { | ||
if (!obj || (typeof obj === 'undefined' ? 'undefined' : _typeof(obj)) !== 'object') { | ||
return false; | ||
@@ -29,4 +31,2 @@ } | ||
return typeof constructor === 'function' && constructor instanceof constructor && fnToString(constructor) === fnToString(Object); | ||
} | ||
module.exports = exports['default']; | ||
} |
"use strict"; | ||
exports.__esModule = true; | ||
exports["default"] = shallowEqual; | ||
exports.default = shallowEqual; | ||
function shallowEqual(objA, objB) { | ||
@@ -27,4 +26,2 @@ if (objA === objB) { | ||
return true; | ||
} | ||
module.exports = exports["default"]; | ||
} |
@@ -7,7 +7,6 @@ 'use strict'; | ||
exports['default'] = _react.PropTypes.shape({ | ||
exports.default = _react.PropTypes.shape({ | ||
subscribe: _react.PropTypes.func.isRequired, | ||
dispatch: _react.PropTypes.func.isRequired, | ||
getState: _react.PropTypes.func.isRequired | ||
}); | ||
module.exports = exports['default']; | ||
}); |
'use strict'; | ||
exports.__esModule = true; | ||
exports['default'] = wrapActionCreators; | ||
exports.default = wrapActionCreators; | ||
@@ -10,6 +10,4 @@ var _redux = require('redux'); | ||
return function (dispatch) { | ||
return _redux.bindActionCreators(actionCreators, dispatch); | ||
return (0, _redux.bindActionCreators)(actionCreators, dispatch); | ||
}; | ||
} | ||
module.exports = exports['default']; | ||
} |
{ | ||
"name": "react-redux", | ||
"version": "4.0.0", | ||
"version": "4.0.1", | ||
"description": "Official React bindings for Redux", | ||
"main": "./lib/index.js", | ||
"jsnext:main": "./src/index.js", | ||
"scripts": { | ||
@@ -14,3 +15,3 @@ "build:lib": "babel src --out-dir lib", | ||
"prepublish": "npm run clean && npm run build", | ||
"test": "mocha --compilers js:babel/register --recursive", | ||
"test": "mocha --compilers js:babel-core/register --recursive --require ./test/setup.js", | ||
"test:watch": "npm test -- --watch", | ||
@@ -23,2 +24,7 @@ "test:cov": "babel-node ./node_modules/isparta/bin/isparta cover ./node_modules/mocha/bin/_mocha -- --recursive" | ||
}, | ||
"files": [ | ||
"dist", | ||
"lib", | ||
"src" | ||
], | ||
"keywords": [ | ||
@@ -42,15 +48,18 @@ "react", | ||
"devDependencies": { | ||
"babel": "^5.8.21", | ||
"babel-core": "^5.8.22", | ||
"babel-eslint": "^3.1.15", | ||
"babel-loader": "^5.3.2", | ||
"eslint": "^0.23", | ||
"eslint-config-airbnb": "0.0.6", | ||
"eslint-plugin-react": "^2.3.0", | ||
"babel-cli": "^6.3.15", | ||
"babel-core": "^6.1.20", | ||
"babel-eslint": "^5.0.0-beta4", | ||
"babel-loader": "^6.2.0", | ||
"babel-plugin-transform-decorators-legacy": "^1.2.0", | ||
"babel-preset-es2015-loose": "^6.1.3", | ||
"babel-preset-react": "^6.3.13", | ||
"babel-preset-stage-0": "^6.3.13", | ||
"eslint": "^1.7.1", | ||
"eslint-config-rackt": "1.1.0", | ||
"eslint-plugin-react": "^3.6.3", | ||
"expect": "^1.8.0", | ||
"isparta": "^3.0.3", | ||
"isparta": "4.0.0", | ||
"istanbul": "^0.3.17", | ||
"jsdom": "~5.4.3", | ||
"mocha": "^2.2.5", | ||
"mocha-jsdom": "~0.4.0", | ||
"react": "^0.14.0", | ||
@@ -57,0 +66,0 @@ "react-addons-test-utils": "^0.14.0", |
React Redux | ||
========================= | ||
Official React bindings for [Redux](https://github.com/gaearon/redux). | ||
Official React bindings for [Redux](https://github.com/rackt/redux). | ||
Performant and flexible. | ||
@@ -14,2 +14,4 @@ | ||
React Redux requires **React 0.14 or later.** | ||
``` | ||
@@ -19,7 +21,9 @@ npm install --save react-redux | ||
React Redux requires **React 0.14 or later.** | ||
This assumes that you’re using [npm](http://npmjs.com/) package manager with a module bundler like [Webpack](http://webpack.github.io) or [Browserify](http://browserify.org/) to consume [CommonJS modules](http://webpack.github.io/docs/commonjs.html). | ||
If you don’t yet use [npm](http://npmjs.com/) or a modern module bundler, and would rather prefer a single-file [UMD](https://github.com/umdjs/umd) build that makes `ReactRedux` available as a global object, you can grab a pre-built version from [cdnjs](https://cdnjs.com/libraries/react-redux). We *don’t* recommend this approach for any serious application, as most of the libraries complementary to Redux are only available on [npm](http://npmjs.com/). | ||
## React Native | ||
Until [React Native is compatible with React 0.14](https://github.com/facebook/react-native/issues/2985), you’ll need to keep using [React Redux 3.x branch and documentation](https://github.com/rackt/react-redux/tree/v3.1.0). | ||
Until [React Native works on top of React instead of shipping a fork of React](https://github.com/facebook/react-native/issues/2985), you’ll need to keep using [React Redux 3.x branch and documentation](https://github.com/rackt/react-redux/tree/v3.1.0). | ||
@@ -26,0 +30,0 @@ ## Documentation |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
39
60475
22
20
1091
2
1