react-redux
Advanced tools
Comparing version 7.1.0-alpha.5 to 7.1.0-rc.1
All notable changes are described on the [Releases](https://github.com/reduxjs/react-redux/releases) page. |
@@ -1,1 +0,1 @@ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("redux"),require("react-dom")):"function"==typeof define&&define.amd?define(["exports","react","redux","react-dom"],t):t((e=e||self).ReactRedux={},e.React,e.Redux,e.ReactDOM)}(this,function(e,t,r,n){"use strict";var o="default"in t?t.default:t;function i(e,t){return e(t={exports:{}},t.exports),t.exports}var u="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";function s(){}function a(){}a.resetWarningCache=s;var c=i(function(e){e.exports=function(){function e(e,t,r,n,o,i){if(i!==u){var s=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var r={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:s};return r.PropTypes=r,r}()}),p=o.createContext(null);var f=function(e){e()},d=function(){return f},l=null,y={notify:function(){}};var h=function(){function e(e,t){this.store=e,this.parentSub=t,this.unsubscribe=null,this.listeners=y,this.handleChangeWrapper=this.handleChangeWrapper.bind(this)}var t=e.prototype;return t.addNestedSub=function(e){return this.trySubscribe(),this.listeners.subscribe(e)},t.notifyNestedSubs=function(){this.listeners.notify()},t.handleChangeWrapper=function(){this.onStateChange&&this.onStateChange()},t.isSubscribed=function(){return!!this.unsubscribe},t.trySubscribe=function(){var e,t,r;this.unsubscribe||(this.unsubscribe=this.parentSub?this.parentSub.addNestedSub(this.handleChangeWrapper):this.store.subscribe(this.handleChangeWrapper),this.listeners=(e=d(),t=[],r=[],{clear:function(){r=l,t=l},notify:function(){var n=t=r;e(function(){for(var e=0;n.length>e;e++)n[e]()})},get:function(){return r},subscribe:function(e){var n=!0;return r===t&&(r=t.slice()),r.push(e),function(){n&&t!==l&&(n=!1,r===t&&(r=t.slice()),r.splice(r.indexOf(e),1))}}}))},t.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null,this.listeners.clear(),this.listeners=y)},e}(),b=function(e){var t,r;function n(t){var r;r=e.call(this,t)||this;var n=t.store;r.notifySubscribers=r.notifySubscribers.bind(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(r));var o=new h(n);return o.onStateChange=r.notifySubscribers,r.state={store:n,subscription:o},r.previousState=n.getState(),r}(t=n).prototype=Object.create((r=e).prototype),t.prototype.constructor=t,t.__proto__=r;var i=n.prototype;return i.componentDidMount=function(){this._isMounted=!0,this.state.subscription.trySubscribe(),this.previousState!==this.props.store.getState()&&this.state.subscription.notifyNestedSubs()},i.componentWillUnmount=function(){this.unsubscribe&&this.unsubscribe(),this.state.subscription.tryUnsubscribe(),this._isMounted=!1},i.componentDidUpdate=function(e){if(this.props.store!==e.store){this.state.subscription.tryUnsubscribe();var t=new h(this.props.store);t.onStateChange=this.notifySubscribers,this.setState({store:this.props.store,subscription:t})}},i.notifySubscribers=function(){this.state.subscription.notifyNestedSubs()},i.render=function(){return o.createElement((this.props.context||p).Provider,{value:this.state},this.props.children)},n}(t.Component);function v(){return(v=Object.assign||function(e){for(var t=1;arguments.length>t;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function m(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;i.length>n;n++)0>t.indexOf(r=i[n])&&(o[r]=e[r]);return o}b.propTypes={store:c.shape({subscribe:c.func.isRequired,dispatch:c.func.isRequired,getState:c.func.isRequired}),context:c.object,children:c.any};var P,S=i(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var r="function"==typeof Symbol&&Symbol.for,n=r?Symbol.for("react.element"):60103,o=r?Symbol.for("react.portal"):60106,i=r?Symbol.for("react.fragment"):60107,u=r?Symbol.for("react.strict_mode"):60108,s=r?Symbol.for("react.profiler"):60114,a=r?Symbol.for("react.provider"):60109,c=r?Symbol.for("react.context"):60110,p=r?Symbol.for("react.async_mode"):60111,f=r?Symbol.for("react.concurrent_mode"):60111,d=r?Symbol.for("react.forward_ref"):60112,l=r?Symbol.for("react.suspense"):60113,y=r?Symbol.for("react.memo"):60115,h=r?Symbol.for("react.lazy"):60116;function b(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e=e.type){case p:case f:case i:case s:case u:case l:return e;default:switch(e=e&&e.$$typeof){case c:case d:case a:return e;default:return t}}case h:case y:case o:return t}}}function v(e){return b(e)===f}t.typeOf=b,t.AsyncMode=p,t.ConcurrentMode=f,t.ContextConsumer=c,t.ContextProvider=a,t.Element=n,t.ForwardRef=d,t.Fragment=i,t.Lazy=h,t.Memo=y,t.Portal=o,t.Profiler=s,t.StrictMode=u,t.Suspense=l,t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===f||e===s||e===u||e===l||"object"==typeof e&&null!==e&&(e.$$typeof===h||e.$$typeof===y||e.$$typeof===a||e.$$typeof===c||e.$$typeof===d)},t.isAsyncMode=function(e){return v(e)||b(e)===p},t.isConcurrentMode=v,t.isContextConsumer=function(e){return b(e)===c},t.isContextProvider=function(e){return b(e)===a},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===n},t.isForwardRef=function(e){return b(e)===d},t.isFragment=function(e){return b(e)===i},t.isLazy=function(e){return b(e)===h},t.isMemo=function(e){return b(e)===y},t.isPortal=function(e){return b(e)===o},t.isProfiler=function(e){return b(e)===s},t.isStrictMode=function(e){return b(e)===u},t.isSuspense=function(e){return b(e)===l}});(P=S)&&P.__esModule&&Object.prototype.hasOwnProperty.call(P,"default");var g=i(function(e){e.exports=S}),O=g.isContextConsumer,w={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},C={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},x={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},R={};function E(e){return g.isMemo(e)?x:R[e.$$typeof]||w}R[g.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0};var M=Object.defineProperty,T=Object.getOwnPropertyNames,j=Object.getOwnPropertySymbols,_=Object.getOwnPropertyDescriptor,N=Object.getPrototypeOf,q=Object.prototype;var D=function e(t,r,n){if("string"!=typeof r){if(q){var o=N(r);o&&o!==q&&e(t,o,n)}var i=T(r);j&&(i=i.concat(j(r)));for(var u=E(t),s=E(r),a=0;i.length>a;++a){var c=i[a];if(!(C[c]||n&&n[c]||s&&s[c]||u&&u[c])){var p=_(r,c);try{M(t,c,p)}catch(e){}}}return t}return t},$=function(e,t,r,n,o,i,u,s){if(!e){var a;if(void 0===t)a=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,i,u,s],p=0;(a=Error(t.replace(/%s/g,function(){return c[p++]}))).name="Invariant Violation"}throw a.framesToPop=1,a}},F=[],U=[null,null];function W(e,t){return[t.payload,e[1]+1]}var k=function(){return[null,0]},A="undefined"!=typeof window?t.useLayoutEffect:t.useEffect;function H(e,r){void 0===r&&(r={});var n=r.getDisplayName,i=void 0===n?function(e){return"ConnectAdvanced("+e+")"}:n,u=r.methodName,s=void 0===u?"connectAdvanced":u,a=r.renderCountProp,c=void 0===a?void 0:a,f=r.shouldHandleStateChanges,d=void 0===f||f,l=r.storeKey,y=void 0===l?"store":l,b=r.withRef,P=void 0!==b&&b,S=r.forwardRef,g=void 0!==S&&S,w=r.context,C=void 0===w?p:w,x=m(r,["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"]);$(void 0===c,"renderCountProp is removed. render counting is built into the latest React Dev Tools profiling extension"),$(!P,"withRef is removed. To access the wrapped instance, use a ref on the connected component");$("store"===y,"storeKey has been removed and does not do anything. To use a custom Redux store for specific components, create a custom React context with React.createContext(), and pass the context object to React Redux's Provider and specific components like: <Provider context={MyContext}><ConnectedComponent context={MyContext} /></Provider>. You may also pass a {context : MyContext} option to connect");var R=C;return function(r){var n=r.displayName||r.name||"Component",u=i(n),a=v({},x,{getDisplayName:i,methodName:s,renderCountProp:c,shouldHandleStateChanges:d,storeKey:y,displayName:u,wrappedComponentName:n,WrappedComponent:r}),p=x.pure;var f=p?t.useMemo:function(e){return e()};function l(n){var i=t.useMemo(function(){return[n.context,n.forwardedRef,m(n,["context","forwardedRef"])]},[n]),s=i[0],c=i[1],p=i[2],l=t.useMemo(function(){return s&&s.Consumer&&O(o.createElement(s.Consumer,null))?s:R},[s,R]),y=t.useContext(l),b=!!n.store;$(b||!!y&&!!y.store,'Could not find "store" in the context of "'+u+'". Either wrap the root component in a <Provider>, or pass a custom React context provider to <Provider> and the corresponding React context consumer to '+u+" in connect options.");var P=n.store||y.store,S=t.useMemo(function(){return function(t){return e(t.dispatch,a)}(P)},[P]),g=t.useMemo(function(){if(!d)return U;var e=new h(P,b?null:y.subscription),t=e.notifyNestedSubs.bind(e);return[e,t]},[P,b,y]),w=g[0],C=g[1],x=t.useMemo(function(){return b?y:v({},y,{subscription:w})},[b,y,w]),E=t.useReducer(W,F,k),M=E[0][0],T=E[1];if(M&&M.error)throw M.error;var j=t.useRef(),_=t.useRef(p),N=t.useRef(),q=t.useRef(!1),D=f(function(){return N.current&&p===_.current?N.current:S(P.getState(),p)},[P,M,p]);A(function(){_.current=p,j.current=D,q.current=!1,N.current&&(N.current=null,C())}),A(function(){if(d){var e=!1,t=null,r=function(){if(!e){var r,n,o=P.getState();try{r=S(o,_.current)}catch(e){n=e,t=e}n||(t=null),r===j.current?q.current||C():(j.current=r,N.current=r,q.current=!0,T({type:"STORE_UPDATED",payload:{latestStoreState:o,error:n}}))}};w.onStateChange=r,w.trySubscribe(),r();return function(){if(e=!0,w.tryUnsubscribe(),t)throw t}}},[P,w,S]);var H=t.useMemo(function(){return o.createElement(r,v({},D,{ref:c}))},[c,r,D]);return t.useMemo(function(){return d?o.createElement(l.Provider,{value:x},H):H},[l,H,x])}var b=p?o.memo(l):l;if(b.WrappedComponent=r,b.displayName=u,g){var P=o.forwardRef(function(e,t){return o.createElement(b,v({},e,{forwardedRef:t}))});return P.displayName=u,P.WrappedComponent=r,D(P,r)}return D(b,r)}}var I=Object.prototype.hasOwnProperty;function L(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function K(e,t){if(L(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var r=Object.keys(e);if(r.length!==Object.keys(t).length)return!1;for(var n=0;r.length>n;n++)if(!I.call(t,r[n])||!L(e[r[n]],t[r[n]]))return!1;return!0}function z(e){return function(t,r){var n=e(t,r);function o(){return n}return o.dependsOnOwnProps=!1,o}}function V(e){return null!=e.dependsOnOwnProps?!!e.dependsOnOwnProps:1!==e.length}function Y(e,t){return function(t,r){var n=function(e,t){return n.dependsOnOwnProps?n.mapToProps(e,t):n.mapToProps(e)};return n.dependsOnOwnProps=!0,n.mapToProps=function(t,r){n.mapToProps=e,n.dependsOnOwnProps=V(e);var o=n(t,r);return"function"==typeof o&&(n.mapToProps=o,n.dependsOnOwnProps=V(o),o=n(t,r)),o},n}}function B(e,t,r){return v({},r,e,t)}var G=[function(e){return"function"==typeof e?function(e){return function(t,r){var n,o=r.pure,i=r.areMergedPropsEqual,u=!1;return function(t,r,s){var a=e(t,r,s);return u?o&&i(a,n)||(n=a):(u=!0,n=a),n}}}(e):void 0},function(e){return e?void 0:function(){return B}}];function J(e,t,r,n){return function(o,i){return r(e(o,i),t(n,i),i)}}function Q(e,t,r,n,o){var i,u,s,a,c,p=o.areStatesEqual,f=o.areOwnPropsEqual,d=o.areStatePropsEqual,l=!1;function y(o,l){var y,h,b=!f(l,u),v=!p(o,i);return i=o,u=l,b&&v?(s=e(i,u),t.dependsOnOwnProps&&(a=t(n,u)),c=r(s,a,u)):b?(e.dependsOnOwnProps&&(s=e(i,u)),t.dependsOnOwnProps&&(a=t(n,u)),c=r(s,a,u)):v?(y=e(i,u),h=!d(y,s),s=y,h&&(c=r(s,a,u)),c):c}return function(o,p){return l?y(o,p):(s=e(i=o,u=p),a=t(n,u),c=r(s,a,u),l=!0,c)}}function X(e,t){var r=t.initMapStateToProps,n=t.initMapDispatchToProps,o=t.initMergeProps,i=m(t,["initMapStateToProps","initMapDispatchToProps","initMergeProps"]),u=r(e,i),s=n(e,i),a=o(e,i);return(i.pure?Q:J)(u,s,a,e,i)}function Z(e,t,r){for(var n=t.length-1;n>=0;n--){var o=t[n](e);if(o)return o}return function(t,n){throw Error("Invalid value of type "+typeof e+" for "+r+" argument when connecting component "+n.wrappedComponentName+".")}}function ee(e,t){return e===t}var te,re,ne,oe,ie,ue,se,ae,ce,pe,fe,de,le=(oe=void 0===(ne=(re=void 0===te?{}:te).connectHOC)?H:ne,ue=void 0===(ie=re.mapStateToPropsFactories)?[function(e){return"function"==typeof e?Y(e):void 0},function(e){return e?void 0:z(function(){return{}})}]:ie,ae=void 0===(se=re.mapDispatchToPropsFactories)?[function(e){return"function"==typeof e?Y(e):void 0},function(e){return e?void 0:z(function(e){return{dispatch:e}})},function(e){return e&&"object"==typeof e?z(function(t){return r.bindActionCreators(e,t)}):void 0}]:se,pe=void 0===(ce=re.mergePropsFactories)?G:ce,de=void 0===(fe=re.selectorFactory)?X:fe,function(e,t,r,n){void 0===n&&(n={});var o=n.pure,i=void 0===o||o,u=n.areStatesEqual,s=void 0===u?ee:u,a=n.areOwnPropsEqual,c=void 0===a?K:a,p=n.areStatePropsEqual,f=void 0===p?K:p,d=n.areMergedPropsEqual,l=void 0===d?K:d,y=m(n,["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"]),h=Z(e,ue,"mapStateToProps"),b=Z(t,ae,"mapDispatchToProps"),P=Z(r,pe,"mergeProps");return oe(de,v({methodName:"connect",getDisplayName:function(e){return"Connect("+e+")"},shouldHandleStateChanges:!!e,initMapStateToProps:h,initMapDispatchToProps:b,initMergeProps:P,pure:i,areStatesEqual:s,areOwnPropsEqual:c,areStatePropsEqual:f,areMergedPropsEqual:l},y))});function ye(){var e=t.useContext(p);return $(e,"could not find react-redux context value; please ensure the component is wrapped in a <Provider>"),e}function he(){return ye().store}var be="undefined"!=typeof window?t.useLayoutEffect:t.useEffect,ve=function(e,t){return e===t};f=n.unstable_batchedUpdates,Object.defineProperty(e,"batch",{enumerable:!0,get:function(){return n.unstable_batchedUpdates}}),e.Provider=b,e.ReactReduxContext=p,e.connect=le,e.connectAdvanced=H,e.shallowEqual=K,e.useDispatch=function(){return he().dispatch},e.useSelector=function(e,r){void 0===r&&(r=ve),$(e,"You must pass a selector to useSelectors");var n,o=ye(),i=o.store,u=o.subscription,s=t.useReducer(function(e){return e+1},0)[1],a=t.useMemo(function(){return new h(i,u)},[i,u]),c=t.useRef(),p=t.useRef(),f=t.useRef();try{n=e!==p.current||c.current?e(i.getState()):f.current}catch(e){var d="An error occured while selecting the store state: "+e.message+".";throw c.current&&(d+="\nThe error may be correlated with this previous error:\n"+c.current.stack+"\n\nOriginal stack trace:"),Error(d)}return be(function(){p.current=e,f.current=n,c.current=void 0}),be(function(){function e(){try{var e=p.current(i.getState());if(r(e,f.current))return;f.current=e}catch(e){c.current=e}s({})}return a.onStateChange=e,a.trySubscribe(),e(),function(){return a.tryUnsubscribe()}},[i,a]),n},e.useStore=he,Object.defineProperty(e,"__esModule",{value:!0})}); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("redux"),require("react-dom")):"function"==typeof define&&define.amd?define(["exports","react","redux","react-dom"],t):t((e=e||self).ReactRedux={},e.React,e.Redux,e.ReactDOM)}(this,function(e,t,r,n){"use strict";var o="default"in t?t.default:t;function i(e,t){return e(t={exports:{}},t.exports),t.exports}var u="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";function s(){}function a(){}a.resetWarningCache=s;var c=i(function(e){e.exports=function(){function e(e,t,r,n,o,i){if(i!==u){var s=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var r={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:s};return r.PropTypes=r,r}()}),p=o.createContext(null);var f=function(e){e()},d=function(){return f},l=null,y={notify:function(){}};var h=function(){function e(e,t){this.store=e,this.parentSub=t,this.unsubscribe=null,this.listeners=y,this.handleChangeWrapper=this.handleChangeWrapper.bind(this)}var t=e.prototype;return t.addNestedSub=function(e){return this.trySubscribe(),this.listeners.subscribe(e)},t.notifyNestedSubs=function(){this.listeners.notify()},t.handleChangeWrapper=function(){this.onStateChange&&this.onStateChange()},t.isSubscribed=function(){return!!this.unsubscribe},t.trySubscribe=function(){this.unsubscribe||(this.unsubscribe=this.parentSub?this.parentSub.addNestedSub(this.handleChangeWrapper):this.store.subscribe(this.handleChangeWrapper),this.listeners=function(){var e=d(),t=[],r=[];return{clear:function(){r=l,t=l},notify:function(){var n=t=r;e(function(){for(var e=0;n.length>e;e++)n[e]()})},get:function(){return r},subscribe:function(e){var n=!0;return r===t&&(r=t.slice()),r.push(e),function(){n&&t!==l&&(n=!1,r===t&&(r=t.slice()),r.splice(r.indexOf(e),1))}}}}())},t.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null,this.listeners.clear(),this.listeners=y)},e}(),v=function(e){var t,r;function n(t){var r;r=e.call(this,t)||this;var n=t.store;r.notifySubscribers=r.notifySubscribers.bind(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(r));var o=new h(n);return o.onStateChange=r.notifySubscribers,r.state={store:n,subscription:o},r.previousState=n.getState(),r}(t=n).prototype=Object.create((r=e).prototype),t.prototype.constructor=t,t.__proto__=r;var i=n.prototype;return i.componentDidMount=function(){this._isMounted=!0,this.state.subscription.trySubscribe(),this.previousState!==this.props.store.getState()&&this.state.subscription.notifyNestedSubs()},i.componentWillUnmount=function(){this.unsubscribe&&this.unsubscribe(),this.state.subscription.tryUnsubscribe(),this._isMounted=!1},i.componentDidUpdate=function(e){if(this.props.store!==e.store){this.state.subscription.tryUnsubscribe();var t=new h(this.props.store);t.onStateChange=this.notifySubscribers,this.setState({store:this.props.store,subscription:t})}},i.notifySubscribers=function(){this.state.subscription.notifyNestedSubs()},i.render=function(){return o.createElement((this.props.context||p).Provider,{value:this.state},this.props.children)},n}(t.Component);function m(){return(m=Object.assign||function(e){for(var t=1;arguments.length>t;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function b(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;i.length>n;n++)0>t.indexOf(r=i[n])&&(o[r]=e[r]);return o}v.propTypes={store:c.shape({subscribe:c.func.isRequired,dispatch:c.func.isRequired,getState:c.func.isRequired}),context:c.object,children:c.any};var P,S=i(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var r="function"==typeof Symbol&&Symbol.for,n=r?Symbol.for("react.element"):60103,o=r?Symbol.for("react.portal"):60106,i=r?Symbol.for("react.fragment"):60107,u=r?Symbol.for("react.strict_mode"):60108,s=r?Symbol.for("react.profiler"):60114,a=r?Symbol.for("react.provider"):60109,c=r?Symbol.for("react.context"):60110,p=r?Symbol.for("react.async_mode"):60111,f=r?Symbol.for("react.concurrent_mode"):60111,d=r?Symbol.for("react.forward_ref"):60112,l=r?Symbol.for("react.suspense"):60113,y=r?Symbol.for("react.memo"):60115,h=r?Symbol.for("react.lazy"):60116;function v(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e=e.type){case p:case f:case i:case s:case u:case l:return e;default:switch(e=e&&e.$$typeof){case c:case d:case a:return e;default:return t}}case h:case y:case o:return t}}}function m(e){return v(e)===f}t.typeOf=v,t.AsyncMode=p,t.ConcurrentMode=f,t.ContextConsumer=c,t.ContextProvider=a,t.Element=n,t.ForwardRef=d,t.Fragment=i,t.Lazy=h,t.Memo=y,t.Portal=o,t.Profiler=s,t.StrictMode=u,t.Suspense=l,t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===f||e===s||e===u||e===l||"object"==typeof e&&null!==e&&(e.$$typeof===h||e.$$typeof===y||e.$$typeof===a||e.$$typeof===c||e.$$typeof===d)},t.isAsyncMode=function(e){return m(e)||v(e)===p},t.isConcurrentMode=m,t.isContextConsumer=function(e){return v(e)===c},t.isContextProvider=function(e){return v(e)===a},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===n},t.isForwardRef=function(e){return v(e)===d},t.isFragment=function(e){return v(e)===i},t.isLazy=function(e){return v(e)===h},t.isMemo=function(e){return v(e)===y},t.isPortal=function(e){return v(e)===o},t.isProfiler=function(e){return v(e)===s},t.isStrictMode=function(e){return v(e)===u},t.isSuspense=function(e){return v(e)===l}});(P=S)&&P.__esModule&&Object.prototype.hasOwnProperty.call(P,"default");var g=i(function(e){e.exports=S}),w=g.isContextConsumer,O={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},C={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},x={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},R={};function E(e){return g.isMemo(e)?x:R[e.$$typeof]||O}R[g.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0};var M=Object.defineProperty,T=Object.getOwnPropertyNames,j=Object.getOwnPropertySymbols,_=Object.getOwnPropertyDescriptor,N=Object.getPrototypeOf,q=Object.prototype;var D=function e(t,r,n){if("string"!=typeof r){if(q){var o=N(r);o&&o!==q&&e(t,o,n)}var i=T(r);j&&(i=i.concat(j(r)));for(var u=E(t),s=E(r),a=0;i.length>a;++a){var c=i[a];if(!(C[c]||n&&n[c]||s&&s[c]||u&&u[c])){var p=_(r,c);try{M(t,c,p)}catch(e){}}}return t}return t},$=function(e,t,r,n,o,i,u,s){if(!e){var a;if(void 0===t)a=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,i,u,s],p=0;(a=Error(t.replace(/%s/g,function(){return c[p++]}))).name="Invariant Violation"}throw a.framesToPop=1,a}},F=[],U=[null,null];function W(e,t){return[t.payload,e[1]+1]}var k=function(){return[null,0]},A="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?t.useLayoutEffect:t.useEffect;function H(e,r){void 0===r&&(r={});var n=r.getDisplayName,i=void 0===n?function(e){return"ConnectAdvanced("+e+")"}:n,u=r.methodName,s=void 0===u?"connectAdvanced":u,a=r.renderCountProp,c=void 0===a?void 0:a,f=r.shouldHandleStateChanges,d=void 0===f||f,l=r.storeKey,y=void 0===l?"store":l,v=r.withRef,P=void 0!==v&&v,S=r.forwardRef,g=void 0!==S&&S,O=r.context,C=void 0===O?p:O,x=b(r,["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"]);$(void 0===c,"renderCountProp is removed. render counting is built into the latest React Dev Tools profiling extension"),$(!P,"withRef is removed. To access the wrapped instance, use a ref on the connected component");$("store"===y,"storeKey has been removed and does not do anything. To use a custom Redux store for specific components, create a custom React context with React.createContext(), and pass the context object to React Redux's Provider and specific components like: <Provider context={MyContext}><ConnectedComponent context={MyContext} /></Provider>. You may also pass a {context : MyContext} option to connect");var R=C;return function(r){var n=r.displayName||r.name||"Component",u=i(n),a=m({},x,{getDisplayName:i,methodName:s,renderCountProp:c,shouldHandleStateChanges:d,storeKey:y,displayName:u,wrappedComponentName:n,WrappedComponent:r}),p=x.pure;var f=p?t.useMemo:function(e){return e()};function l(n){var i=t.useMemo(function(){var e=n.forwardedRef,t=b(n,["forwardedRef"]);return[n.context,e,t]},[n]),s=i[0],c=i[1],p=i[2],l=t.useMemo(function(){return s&&s.Consumer&&w(o.createElement(s.Consumer,null))?s:R},[s,R]),y=t.useContext(l),v=!!n.store;$(v||!!y&&!!y.store,'Could not find "store" in the context of "'+u+'". Either wrap the root component in a <Provider>, or pass a custom React context provider to <Provider> and the corresponding React context consumer to '+u+" in connect options.");var P=n.store||y.store,S=t.useMemo(function(){return function(t){return e(t.dispatch,a)}(P)},[P]),g=t.useMemo(function(){if(!d)return U;var e=new h(P,v?null:y.subscription),t=e.notifyNestedSubs.bind(e);return[e,t]},[P,v,y]),O=g[0],C=g[1],x=t.useMemo(function(){return v?y:m({},y,{subscription:O})},[v,y,O]),E=t.useReducer(W,F,k),M=E[0][0],T=E[1];if(M&&M.error)throw M.error;var j=t.useRef(),_=t.useRef(p),N=t.useRef(),q=t.useRef(!1),D=f(function(){return N.current&&p===_.current?N.current:S(P.getState(),p)},[P,M,p]);A(function(){_.current=p,j.current=D,q.current=!1,N.current&&(N.current=null,C())}),A(function(){if(d){var e=!1,t=null,r=function(){if(!e){var r,n,o=P.getState();try{r=S(o,_.current)}catch(e){n=e,t=e}n||(t=null),r===j.current?q.current||C():(j.current=r,N.current=r,q.current=!0,T({type:"STORE_UPDATED",payload:{latestStoreState:o,error:n}}))}};O.onStateChange=r,O.trySubscribe(),r();return function(){if(e=!0,O.tryUnsubscribe(),t)throw t}}},[P,O,S]);var H=t.useMemo(function(){return o.createElement(r,m({},D,{ref:c}))},[c,r,D]);return t.useMemo(function(){return d?o.createElement(l.Provider,{value:x},H):H},[l,H,x])}var v=p?o.memo(l):l;if(v.WrappedComponent=r,v.displayName=u,g){var P=o.forwardRef(function(e,t){return o.createElement(v,m({},e,{forwardedRef:t}))});return P.displayName=u,P.WrappedComponent=r,D(P,r)}return D(v,r)}}var I=Object.prototype.hasOwnProperty;function L(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function K(e,t){if(L(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var r=Object.keys(e);if(r.length!==Object.keys(t).length)return!1;for(var n=0;r.length>n;n++)if(!I.call(t,r[n])||!L(e[r[n]],t[r[n]]))return!1;return!0}function z(e){return function(t,r){var n=e(t,r);function o(){return n}return o.dependsOnOwnProps=!1,o}}function V(e){return null!=e.dependsOnOwnProps?!!e.dependsOnOwnProps:1!==e.length}function Y(e,t){return function(t,r){var n=function(e,t){return n.dependsOnOwnProps?n.mapToProps(e,t):n.mapToProps(e)};return n.dependsOnOwnProps=!0,n.mapToProps=function(t,r){n.mapToProps=e,n.dependsOnOwnProps=V(e);var o=n(t,r);return"function"==typeof o&&(n.mapToProps=o,n.dependsOnOwnProps=V(o),o=n(t,r)),o},n}}function B(e,t,r){return m({},r,e,t)}var G=[function(e){return"function"==typeof e?function(e){return function(t,r){var n,o=r.pure,i=r.areMergedPropsEqual,u=!1;return function(t,r,s){var a=e(t,r,s);return u?o&&i(a,n)||(n=a):(u=!0,n=a),n}}}(e):void 0},function(e){return e?void 0:function(){return B}}];function J(e,t,r,n){return function(o,i){return r(e(o,i),t(n,i),i)}}function Q(e,t,r,n,o){var i,u,s,a,c,p=o.areStatesEqual,f=o.areOwnPropsEqual,d=o.areStatePropsEqual,l=!1;function y(o,l){var y,h,v=!f(l,u),m=!p(o,i);return i=o,u=l,v&&m?(s=e(i,u),t.dependsOnOwnProps&&(a=t(n,u)),c=r(s,a,u)):v?(e.dependsOnOwnProps&&(s=e(i,u)),t.dependsOnOwnProps&&(a=t(n,u)),c=r(s,a,u)):m?(y=e(i,u),h=!d(y,s),s=y,h&&(c=r(s,a,u)),c):c}return function(o,p){return l?y(o,p):(s=e(i=o,u=p),a=t(n,u),c=r(s,a,u),l=!0,c)}}function X(e,t){var r=t.initMapStateToProps,n=t.initMapDispatchToProps,o=t.initMergeProps,i=b(t,["initMapStateToProps","initMapDispatchToProps","initMergeProps"]),u=r(e,i),s=n(e,i),a=o(e,i);return(i.pure?Q:J)(u,s,a,e,i)}function Z(e,t,r){for(var n=t.length-1;n>=0;n--){var o=t[n](e);if(o)return o}return function(t,n){throw Error("Invalid value of type "+typeof e+" for "+r+" argument when connecting component "+n.wrappedComponentName+".")}}function ee(e,t){return e===t}var te,re,ne,oe,ie,ue,se,ae,ce,pe,fe,de,le=(oe=void 0===(ne=(re=void 0===te?{}:te).connectHOC)?H:ne,ue=void 0===(ie=re.mapStateToPropsFactories)?[function(e){return"function"==typeof e?Y(e):void 0},function(e){return e?void 0:z(function(){return{}})}]:ie,ae=void 0===(se=re.mapDispatchToPropsFactories)?[function(e){return"function"==typeof e?Y(e):void 0},function(e){return e?void 0:z(function(e){return{dispatch:e}})},function(e){return e&&"object"==typeof e?z(function(t){return r.bindActionCreators(e,t)}):void 0}]:se,pe=void 0===(ce=re.mergePropsFactories)?G:ce,de=void 0===(fe=re.selectorFactory)?X:fe,function(e,t,r,n){void 0===n&&(n={});var o=n.pure,i=void 0===o||o,u=n.areStatesEqual,s=void 0===u?ee:u,a=n.areOwnPropsEqual,c=void 0===a?K:a,p=n.areStatePropsEqual,f=void 0===p?K:p,d=n.areMergedPropsEqual,l=void 0===d?K:d,y=b(n,["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"]),h=Z(e,ue,"mapStateToProps"),v=Z(t,ae,"mapDispatchToProps"),P=Z(r,pe,"mergeProps");return oe(de,m({methodName:"connect",getDisplayName:function(e){return"Connect("+e+")"},shouldHandleStateChanges:!!e,initMapStateToProps:h,initMapDispatchToProps:v,initMergeProps:P,pure:i,areStatesEqual:s,areOwnPropsEqual:c,areStatePropsEqual:f,areMergedPropsEqual:l},y))});function ye(){var e=t.useContext(p);return $(e,"could not find react-redux context value; please ensure the component is wrapped in a <Provider>"),e}function he(){return ye().store}var ve="undefined"!=typeof window?t.useLayoutEffect:t.useEffect,me=function(e,t){return e===t};f=n.unstable_batchedUpdates,Object.defineProperty(e,"batch",{enumerable:!0,get:function(){return n.unstable_batchedUpdates}}),e.Provider=v,e.ReactReduxContext=p,e.connect=le,e.connectAdvanced=H,e.shallowEqual=K,e.useDispatch=function(){return he().dispatch},e.useSelector=function(e,r){void 0===r&&(r=me),$(e,"You must pass a selector to useSelectors");var n,o=ye(),i=o.store,u=o.subscription,s=t.useReducer(function(e){return e+1},0)[1],a=t.useMemo(function(){return new h(i,u)},[i,u]),c=t.useRef(),p=t.useRef(),f=t.useRef();try{n=e!==p.current||c.current?e(i.getState()):f.current}catch(e){var d="An error occured while selecting the store state: "+e.message+".";throw c.current&&(d+="\nThe error may be correlated with this previous error:\n"+c.current.stack+"\n\nOriginal stack trace:"),Error(d)}return ve(function(){p.current=e,f.current=n,c.current=void 0}),ve(function(){function e(){try{var e=p.current(i.getState());if(r(e,f.current))return;f.current=e}catch(e){c.current=e}s({})}return a.onStateChange=e,a.trySubscribe(),e(),function(){return a.tryUnsubscribe()}},[i,a]),n},e.useStore=he,Object.defineProperty(e,"__esModule",{value:!0})}); |
@@ -35,3 +35,3 @@ import _extends from "@babel/runtime/helpers/esm/extends"; | ||
var useIsomorphicLayoutEffect = typeof window !== 'undefined' ? useLayoutEffect : useEffect; | ||
var useIsomorphicLayoutEffect = typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined' ? useLayoutEffect : useEffect; | ||
export default function connectAdvanced( | ||
@@ -41,10 +41,10 @@ /* | ||
compute new props from state, props, and dispatch. For example: | ||
export default connectAdvanced((dispatch, options) => (state, props) => ({ | ||
export default connectAdvanced((dispatch, options) => (state, props) => ({ | ||
thing: state.things[props.thingId], | ||
saveThing: fields => dispatch(actionCreators.saveThing(props.thingId, fields)), | ||
}))(YourComponent) | ||
Access to dispatch is provided to the factory so selectorFactories can bind actionCreators | ||
Access to dispatch is provided to the factory so selectorFactories can bind actionCreators | ||
outside of their selector as an optimization. Options passed to connectAdvanced are passed to | ||
the selectorFactory, along with displayName and WrappedComponent, as the second argument. | ||
Note that selectorFactory is responsible for all caching/memoization of inbound and outbound | ||
Note that selectorFactory is responsible for all caching/memoization of inbound and outbound | ||
props. Do not use connectAdvanced directly without memoizing results between calls to your | ||
@@ -122,7 +122,6 @@ selector, otherwise the Connect component will re-render on every state or props change. | ||
// To maintain the wrapperProps object reference, memoize this destructuring. | ||
var context = props.context, | ||
forwardedRef = props.forwardedRef, | ||
wrapperProps = _objectWithoutPropertiesLoose(props, ["context", "forwardedRef"]); | ||
var forwardedRef = props.forwardedRef, | ||
wrapperProps = _objectWithoutPropertiesLoose(props, ["forwardedRef"]); | ||
return [context, forwardedRef, wrapperProps]; | ||
return [props.context, forwardedRef, wrapperProps]; | ||
}, [props]), | ||
@@ -129,0 +128,0 @@ propsContext = _useMemo[0], |
@@ -0,0 +0,0 @@ import _extends from "@babel/runtime/helpers/esm/extends"; |
@@ -7,3 +7,3 @@ import { useStore } from './useStore'; | ||
* | ||
* @returns {any} redux store's `dispatch` function | ||
* @returns {any|function} redux store's `dispatch` function | ||
* | ||
@@ -10,0 +10,0 @@ * @example |
@@ -0,0 +0,0 @@ import { useContext } from 'react'; |
@@ -22,8 +22,8 @@ import { useReducer, useRef, useEffect, useMemo, useLayoutEffect } from 'react'; | ||
* | ||
* This hook takes a dependencies array as an optional second argument, | ||
* which when passed ensures referential stability of the selector (this is primarily | ||
* useful if you provide a selector that memoizes values). | ||
* This hook takes an optional equality comparison function as the second parameter | ||
* that allows you to customize the way the selected state is compared to determine | ||
* whether the component needs to be re-rendered. | ||
* | ||
* @param {Function} selector the selector function | ||
* @param {Function} equalityFn the function that will be used to determine equality | ||
* @param {Function=} equalityFn the function that will be used to determine equality | ||
* | ||
@@ -36,3 +36,2 @@ * @returns {any} the selected state | ||
* import { useSelector } from 'react-redux' | ||
* import { RootState } from './store' | ||
* | ||
@@ -39,0 +38,0 @@ * export const CounterComponent = () => { |
@@ -0,0 +0,0 @@ import { useReduxContext } from './useReduxContext'; |
@@ -0,0 +0,0 @@ /** |
@@ -52,3 +52,3 @@ "use strict"; | ||
var useIsomorphicLayoutEffect = typeof window !== 'undefined' ? _react.useLayoutEffect : _react.useEffect; | ||
var useIsomorphicLayoutEffect = typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined' ? _react.useLayoutEffect : _react.useEffect; | ||
@@ -59,10 +59,10 @@ function connectAdvanced( | ||
compute new props from state, props, and dispatch. For example: | ||
export default connectAdvanced((dispatch, options) => (state, props) => ({ | ||
export default connectAdvanced((dispatch, options) => (state, props) => ({ | ||
thing: state.things[props.thingId], | ||
saveThing: fields => dispatch(actionCreators.saveThing(props.thingId, fields)), | ||
}))(YourComponent) | ||
Access to dispatch is provided to the factory so selectorFactories can bind actionCreators | ||
Access to dispatch is provided to the factory so selectorFactories can bind actionCreators | ||
outside of their selector as an optimization. Options passed to connectAdvanced are passed to | ||
the selectorFactory, along with displayName and WrappedComponent, as the second argument. | ||
Note that selectorFactory is responsible for all caching/memoization of inbound and outbound | ||
Note that selectorFactory is responsible for all caching/memoization of inbound and outbound | ||
props. Do not use connectAdvanced directly without memoizing results between calls to your | ||
@@ -137,6 +137,5 @@ selector, otherwise the Connect component will re-render on every state or props change. | ||
// To maintain the wrapperProps object reference, memoize this destructuring. | ||
var context = props.context, | ||
forwardedRef = props.forwardedRef, | ||
wrapperProps = (0, _objectWithoutPropertiesLoose2["default"])(props, ["context", "forwardedRef"]); | ||
return [context, forwardedRef, wrapperProps]; | ||
var forwardedRef = props.forwardedRef, | ||
wrapperProps = (0, _objectWithoutPropertiesLoose2["default"])(props, ["forwardedRef"]); | ||
return [props.context, forwardedRef, wrapperProps]; | ||
}, [props]), | ||
@@ -143,0 +142,0 @@ propsContext = _useMemo[0], |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -13,3 +13,3 @@ "use strict"; | ||
* | ||
* @returns {any} redux store's `dispatch` function | ||
* @returns {any|function} redux store's `dispatch` function | ||
* | ||
@@ -16,0 +16,0 @@ * @example |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -33,8 +33,8 @@ "use strict"; | ||
* | ||
* This hook takes a dependencies array as an optional second argument, | ||
* which when passed ensures referential stability of the selector (this is primarily | ||
* useful if you provide a selector that memoizes values). | ||
* This hook takes an optional equality comparison function as the second parameter | ||
* that allows you to customize the way the selected state is compared to determine | ||
* whether the component needs to be re-rendered. | ||
* | ||
* @param {Function} selector the selector function | ||
* @param {Function} equalityFn the function that will be used to determine equality | ||
* @param {Function=} equalityFn the function that will be used to determine equality | ||
* | ||
@@ -47,3 +47,2 @@ * @returns {any} the selected state | ||
* import { useSelector } from 'react-redux' | ||
* import { RootState } from './store' | ||
* | ||
@@ -50,0 +49,0 @@ * export const CounterComponent = () => { |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ The MIT License (MIT) |
{ | ||
"name": "react-redux", | ||
"version": "7.1.0-alpha.5", | ||
"version": "7.1.0-rc.1", | ||
"description": "Official React bindings for Redux", | ||
@@ -43,3 +43,3 @@ "keywords": [ | ||
"dependencies": { | ||
"@babel/runtime": "^7.4.3", | ||
"@babel/runtime": "^7.4.5", | ||
"hoist-non-react-statics": "^3.3.0", | ||
@@ -52,14 +52,14 @@ "invariant": "^2.2.4", | ||
"devDependencies": { | ||
"@babel/cli": "^7.4.3", | ||
"@babel/core": "^7.4.3", | ||
"@babel/plugin-proposal-decorators": "^7.4.0", | ||
"@babel/plugin-proposal-object-rest-spread": "^7.4.3", | ||
"@babel/cli": "^7.4.4", | ||
"@babel/core": "^7.4.5", | ||
"@babel/plugin-proposal-decorators": "^7.4.4", | ||
"@babel/plugin-proposal-object-rest-spread": "^7.4.4", | ||
"@babel/plugin-transform-react-display-name": "^7.2.0", | ||
"@babel/plugin-transform-react-jsx": "^7.3.0", | ||
"@babel/plugin-transform-runtime": "^7.4.3", | ||
"@babel/preset-env": "^7.4.3", | ||
"@babel/plugin-transform-runtime": "^7.4.4", | ||
"@babel/preset-env": "^7.4.5", | ||
"babel-core": "^7.0.0-bridge.0", | ||
"babel-eslint": "^10.0.1", | ||
"babel-jest": "^24.7.1", | ||
"codecov": "^3.3.0", | ||
"babel-jest": "^24.8.0", | ||
"codecov": "^3.5.0", | ||
"create-react-class": "^15.6.3", | ||
@@ -69,10 +69,10 @@ "cross-env": "^5.2.0", | ||
"eslint": "^5.16.0", | ||
"eslint-config-prettier": "^4.1.0", | ||
"eslint-plugin-import": "^2.16.0", | ||
"eslint-plugin-prettier": "^3.0.1", | ||
"eslint-plugin-react": "^7.12.4", | ||
"glob": "^7.1.3", | ||
"jest": "^24.7.1", | ||
"jest-dom": "^3.1.3", | ||
"prettier": "^1.16.4", | ||
"eslint-config-prettier": "^4.3.0", | ||
"eslint-plugin-import": "^2.17.3", | ||
"eslint-plugin-prettier": "^3.1.0", | ||
"eslint-plugin-react": "^7.13.0", | ||
"glob": "^7.1.4", | ||
"jest": "^24.8.0", | ||
"jest-dom": "^3.4.0", | ||
"prettier": "^1.17.1", | ||
"react": "^16.8.6", | ||
@@ -82,11 +82,11 @@ "react-dom": "^16.8.6", | ||
"react-test-renderer": "^16.8.6", | ||
"react-testing-library": "^5.9.0", | ||
"react-testing-library": "^7.0.1", | ||
"redux": "^4.0.1", | ||
"rimraf": "^2.6.3", | ||
"rollup": "^1.8.0", | ||
"rollup": "^1.12.4", | ||
"rollup-plugin-babel": "^4.3.2", | ||
"rollup-plugin-commonjs": "^9.3.3", | ||
"rollup-plugin-node-resolve": "^4.0.1", | ||
"rollup-plugin-replace": "^2.1.1", | ||
"rollup-plugin-terser": "^4.0.4" | ||
"rollup-plugin-commonjs": "^10.0.0", | ||
"rollup-plugin-node-resolve": "^5.0.0", | ||
"rollup-plugin-replace": "^2.2.0", | ||
"rollup-plugin-terser": "^5.0.0" | ||
}, | ||
@@ -93,0 +93,0 @@ "browserify": { |
@@ -0,0 +0,0 @@ React Redux |
@@ -0,0 +0,0 @@ import Provider from './components/Provider' |
@@ -41,3 +41,7 @@ import hoistStatics from 'hoist-non-react-statics' | ||
const useIsomorphicLayoutEffect = | ||
typeof window !== 'undefined' ? useLayoutEffect : useEffect | ||
typeof window !== 'undefined' && | ||
typeof window.document !== 'undefined' && | ||
typeof window.document.createElement !== 'undefined' | ||
? useLayoutEffect | ||
: useEffect | ||
@@ -164,4 +168,4 @@ export default function connectAdvanced( | ||
// To maintain the wrapperProps object reference, memoize this destructuring. | ||
const { context, forwardedRef, ...wrapperProps } = props | ||
return [context, forwardedRef, wrapperProps] | ||
const { forwardedRef, ...wrapperProps } = props | ||
return [props.context, forwardedRef, wrapperProps] | ||
}, [props]) | ||
@@ -168,0 +172,0 @@ |
@@ -0,0 +0,0 @@ import React from 'react' |
@@ -0,0 +0,0 @@ import React, { Component } from 'react' |
@@ -0,0 +0,0 @@ import connectAdvanced from '../components/connectAdvanced' |
@@ -0,0 +0,0 @@ import { bindActionCreators } from 'redux' |
@@ -0,0 +0,0 @@ import { wrapMapToPropsConstant, wrapMapToPropsFunc } from './wrapMapToProps' |
@@ -0,0 +0,0 @@ import verifyPlainObject from '../utils/verifyPlainObject' |
@@ -0,0 +0,0 @@ import verifySubselectors from './verifySubselectors' |
@@ -0,0 +0,0 @@ import warning from '../utils/warning' |
@@ -0,0 +0,0 @@ import verifyPlainObject from '../utils/verifyPlainObject' |
@@ -8,3 +8,3 @@ import { useStore } from './useStore' | ||
* | ||
* @returns {any} redux store's `dispatch` function | ||
* @returns {any|function} redux store's `dispatch` function | ||
* | ||
@@ -11,0 +11,0 @@ * @example |
@@ -0,0 +0,0 @@ import { useContext } from 'react' |
@@ -23,8 +23,8 @@ import { useReducer, useRef, useEffect, useMemo, useLayoutEffect } from 'react' | ||
* | ||
* This hook takes a dependencies array as an optional second argument, | ||
* which when passed ensures referential stability of the selector (this is primarily | ||
* useful if you provide a selector that memoizes values). | ||
* This hook takes an optional equality comparison function as the second parameter | ||
* that allows you to customize the way the selected state is compared to determine | ||
* whether the component needs to be re-rendered. | ||
* | ||
* @param {Function} selector the selector function | ||
* @param {Function} equalityFn the function that will be used to determine equality | ||
* @param {Function=} equalityFn the function that will be used to determine equality | ||
* | ||
@@ -37,3 +37,2 @@ * @returns {any} the selected state | ||
* import { useSelector } from 'react-redux' | ||
* import { RootState } from './store' | ||
* | ||
@@ -40,0 +39,0 @@ * export const CounterComponent = () => { |
@@ -0,0 +0,0 @@ import { useReduxContext } from './useReduxContext' |
@@ -0,0 +0,0 @@ import Provider from './components/Provider' |
@@ -0,0 +0,0 @@ // Default to a dummy "batch" implementation that just runs the callback |
/* eslint-disable import/no-unresolved */ | ||
export { unstable_batchedUpdates } from 'react-dom' |
@@ -0,0 +0,0 @@ /* eslint-disable import/no-unresolved */ |
@@ -0,0 +0,0 @@ const hasOwn = Object.prototype.hasOwnProperty |
@@ -0,0 +0,0 @@ import { getBatch } from './batch' |
@@ -0,0 +0,0 @@ import isPlainObject from './isPlainObject' |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ import { bindActionCreators } from 'redux' |
Sorry, the diff of this file is too big to display
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
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
265735
5428
Updated@babel/runtime@^7.4.5