react-redux
Advanced tools
Comparing version 7.2.1 to 7.2.2
All notable changes are described on the [Releases](https://github.com/reduxjs/react-redux/releases) page. |
@@ -1,1 +0,9 @@ | ||
!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 u(e,t){return e(t={exports:{}},t.exports),t.exports}var a="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";function i(){}function c(){}c.resetWarningCache=i;u(function(e){e.exports=function(){function e(e,t,r,n,o,u){if(u!==a){var i=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 i.name="Invariant Violation",i}}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:c,resetWarningCache:i};return r.PropTypes=r,r}()});var s=o.createContext(null);var f=function(e){e()},p=function(){return f},l={notify:function(){}};var d=function(){function e(e,t){this.store=e,this.parentSub=t,this.unsubscribe=null,this.listeners=l,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=p(),t=null,r=null;return{clear:function(){t=null,r=null},notify:function(){e(function(){for(var e=t;e;)e.callback(),e=e.next})},get:function(){for(var e=[],r=t;r;)e.push(r),r=r.next;return e},subscribe:function(e){var n=!0,o=r={callback:e,next:null,prev:r};return o.prev?o.prev.next=o:t=o,function(){n&&null!==t&&(n=!1,o.next?o.next.prev=o.prev:r=o.prev,o.prev?o.prev.next=o.next:t=o.next)}}}}())},t.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null,this.listeners.clear(),this.listeners=l)},e}();function y(){return(y=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 v(e,t){if(null==e)return{};var r,n,o={},u=Object.keys(e);for(n=0;u.length>n;n++)0>t.indexOf(r=u[n])&&(o[r]=e[r]);return o}var m,b=u(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,u=r?Symbol.for("react.fragment"):60107,a=r?Symbol.for("react.strict_mode"):60108,i=r?Symbol.for("react.profiler"):60114,c=r?Symbol.for("react.provider"):60109,s=r?Symbol.for("react.context"):60110,f=r?Symbol.for("react.async_mode"):60111,p=r?Symbol.for("react.concurrent_mode"):60111,l=r?Symbol.for("react.forward_ref"):60112,d=r?Symbol.for("react.suspense"):60113,y=r?Symbol.for("react.suspense_list"):60120,v=r?Symbol.for("react.memo"):60115,m=r?Symbol.for("react.lazy"):60116,b=r?Symbol.for("react.fundamental"):60117,h=r?Symbol.for("react.responder"):60118;function S(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e=e.type){case f:case p:case u:case i:case a:case d:return e;default:switch(e=e&&e.$$typeof){case s:case l:case c:return e;default:return t}}case m:case v:case o:return t}}}function P(e){return S(e)===p}t.typeOf=S,t.AsyncMode=f,t.ConcurrentMode=p,t.ContextConsumer=s,t.ContextProvider=c,t.Element=n,t.ForwardRef=l,t.Fragment=u,t.Lazy=m,t.Memo=v,t.Portal=o,t.Profiler=i,t.StrictMode=a,t.Suspense=d,t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===u||e===p||e===i||e===a||e===d||e===y||"object"==typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===v||e.$$typeof===c||e.$$typeof===s||e.$$typeof===l||e.$$typeof===b||e.$$typeof===h)},t.isAsyncMode=function(e){return P(e)||S(e)===f},t.isConcurrentMode=P,t.isContextConsumer=function(e){return S(e)===s},t.isContextProvider=function(e){return S(e)===c},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===n},t.isForwardRef=function(e){return S(e)===l},t.isFragment=function(e){return S(e)===u},t.isLazy=function(e){return S(e)===m},t.isMemo=function(e){return S(e)===v},t.isPortal=function(e){return S(e)===o},t.isProfiler=function(e){return S(e)===i},t.isStrictMode=function(e){return S(e)===a},t.isSuspense=function(e){return S(e)===d}});(m=b)&&m.__esModule&&Object.prototype.hasOwnProperty.call(m,"default");var h=u(function(e){e.exports=b}),S=h.isContextConsumer,P={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},g={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},O={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},w={};function C(e){return h.isMemo(e)?O:w[e.$$typeof]||P}w[h.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0};var x=Object.defineProperty,E=Object.getOwnPropertyNames,M=Object.getOwnPropertySymbols,R=Object.getOwnPropertyDescriptor,T=Object.getPrototypeOf,$=Object.prototype;var j=function e(t,r,n){if("string"!=typeof r){if($){var o=T(r);o&&o!==$&&e(t,o,n)}var u=E(r);M&&(u=u.concat(M(r)));for(var a=C(t),i=C(r),c=0;u.length>c;++c){var s=u[c];if(!(g[s]||n&&n[s]||i&&i[s]||a&&a[s])){var f=R(r,s);try{x(t,s,f)}catch(e){}}}return t}return t},N="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?t.useLayoutEffect:t.useEffect,_=[],q=[null,null];function D(e,t){return[t.payload,e[1]+1]}function F(e,t,r){N(function(){return e.apply(void 0,t)},r)}function k(e,t,r,n,o,u,a){e.current=n,t.current=o,r.current=!1,u.current&&(u.current=null,a())}function W(e,t,r,n,o,u,a,i,c,s){if(e){var f=!1,p=null,l=function(){if(!f){var e,r,l=t.getState();try{e=n(l,o.current)}catch(e){r=e,p=e}r||(p=null),e===u.current?a.current||c():(u.current=e,i.current=e,a.current=!0,s({type:"STORE_UPDATED",payload:{error:r}}))}};r.onStateChange=l,r.trySubscribe(),l();return function(){if(f=!0,r.tryUnsubscribe(),r.onStateChange=null,p)throw p}}}var H=function(){return[null,0]};function U(e,r){void 0===r&&(r={});var n=r.getDisplayName,u=void 0===n?function(e){return"ConnectAdvanced("+e+")"}:n,a=r.methodName,i=void 0===a?"connectAdvanced":a,c=r.renderCountProp,f=void 0===c?void 0:c,p=r.shouldHandleStateChanges,l=void 0===p||p,m=r.storeKey,b=void 0===m?"store":m,h=r.forwardRef,P=void 0!==h&&h,g=r.context,O=void 0===g?s:g,w=v(r,["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"]),C=O;return function(r){var n=r.displayName||r.name||"Component",a=u(n),c=y({},w,{getDisplayName:u,methodName:i,renderCountProp:f,shouldHandleStateChanges:l,storeKey:b,displayName:a,wrappedComponentName:n,WrappedComponent:r}),s=w.pure;var p=s?t.useMemo:function(e){return e()};function m(n){var u=t.useMemo(function(){var e=n.reactReduxForwardedRef,t=v(n,["reactReduxForwardedRef"]);return[n.context,e,t]},[n]),a=u[0],i=u[1],s=u[2],f=t.useMemo(function(){return a&&a.Consumer&&S(o.createElement(a.Consumer,null))?a:C},[a,C]),m=t.useContext(f),b=!!n.store&&!!n.store.getState&&!!n.store.dispatch,h=b?n.store:m.store,P=t.useMemo(function(){return function(t){return e(t.dispatch,c)}(h)},[h]),g=t.useMemo(function(){if(!l)return q;var e=new d(h,b?null:m.subscription),t=e.notifyNestedSubs.bind(e);return[e,t]},[h,b,m]),O=g[0],w=g[1],x=t.useMemo(function(){return b?m:y({},m,{subscription:O})},[b,m,O]),E=t.useReducer(D,_,H),M=E[0][0],R=E[1];if(M&&M.error)throw M.error;var T=t.useRef(),$=t.useRef(s),j=t.useRef(),N=t.useRef(!1),U=p(function(){return j.current&&s===$.current?j.current:P(h.getState(),s)},[h,M,s]);F(k,[$,T,N,s,U,j,w]),F(W,[l,h,O,P,$,T,N,j,w,R],[h,O,P]);var A=t.useMemo(function(){return o.createElement(r,y({},U,{ref:i}))},[i,r,U]);return t.useMemo(function(){return l?o.createElement(f.Provider,{value:x},A):A},[f,A,x])}var h=s?o.memo(m):m;if(h.WrappedComponent=r,h.displayName=a,P){var g=o.forwardRef(function(e,t){return o.createElement(h,y({},e,{reactReduxForwardedRef:t}))});return g.displayName=a,g.WrappedComponent=r,j(g,r)}return j(h,r)}}function A(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function I(e,t){if(A(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(!Object.prototype.hasOwnProperty.call(t,r[n])||!A(e[r[n]],t[r[n]]))return!1;return!0}function L(e){return function(t,r){var n=e(t,r);function o(){return n}return o.dependsOnOwnProps=!1,o}}function z(e){return null!=e.dependsOnOwnProps?!!e.dependsOnOwnProps:1!==e.length}function K(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=z(e);var o=n(t,r);return"function"==typeof o&&(n.mapToProps=o,n.dependsOnOwnProps=z(o),o=n(t,r)),o},n}}var V=[function(e){return"function"==typeof e?K(e):void 0},function(e){return e?void 0:L(function(e){return{dispatch:e}})},function(e){return e&&"object"==typeof e?L(function(t){return r.bindActionCreators(e,t)}):void 0}];var B=[function(e){return"function"==typeof e?K(e):void 0},function(e){return e?void 0:L(function(){return{}})}];function Y(e,t,r){return y({},r,{},e,{},t)}var G=[function(e){return"function"==typeof e?function(e){return function(t,r){var n,o=r.pure,u=r.areMergedPropsEqual,a=!1;return function(t,r,i){var c=e(t,r,i);return a?o&&u(c,n)||(n=c):(a=!0,n=c),n}}}(e):void 0},function(e){return e?void 0:function(){return Y}}];function J(e,t,r,n){return function(o,u){return r(e(o,u),t(n,u),u)}}function Q(e,t,r,n,o){var u,a,i,c,s,f=o.areStatesEqual,p=o.areOwnPropsEqual,l=o.areStatePropsEqual,d=!1;function y(o,d){var y,v,m=!p(d,a),b=!f(o,u);return u=o,a=d,m&&b?(i=e(u,a),t.dependsOnOwnProps&&(c=t(n,a)),s=r(i,c,a)):m?(e.dependsOnOwnProps&&(i=e(u,a)),t.dependsOnOwnProps&&(c=t(n,a)),s=r(i,c,a)):b?(y=e(u,a),v=!l(y,i),i=y,v&&(s=r(i,c,a)),s):s}return function(o,f){return d?y(o,f):(i=e(u=o,a=f),c=t(n,a),s=r(i,c,a),d=!0,s)}}function X(e,t){var r=t.initMapStateToProps,n=t.initMapDispatchToProps,o=t.initMergeProps,u=v(t,["initMapStateToProps","initMapDispatchToProps","initMergeProps"]),a=r(e,u),i=n(e,u),c=o(e,u);return(u.pure?Q:J)(a,i,c,e,u)}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}function te(e){var t=void 0===e?{}:e,r=t.connectHOC,n=void 0===r?U:r,o=t.mapStateToPropsFactories,u=void 0===o?B:o,a=t.mapDispatchToPropsFactories,i=void 0===a?V:a,c=t.mergePropsFactories,s=void 0===c?G:c,f=t.selectorFactory,p=void 0===f?X:f;return function(e,t,r,o){void 0===o&&(o={});var a=o.pure,c=void 0===a||a,f=o.areStatesEqual,l=void 0===f?ee:f,d=o.areOwnPropsEqual,m=void 0===d?I:d,b=o.areStatePropsEqual,h=void 0===b?I:b,S=o.areMergedPropsEqual,P=void 0===S?I:S,g=v(o,["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"]),O=Z(e,u,"mapStateToProps"),w=Z(t,i,"mapDispatchToProps"),C=Z(r,s,"mergeProps");return n(p,y({methodName:"connect",getDisplayName:function(e){return"Connect("+e+")"},shouldHandleStateChanges:!!e,initMapStateToProps:O,initMapDispatchToProps:w,initMergeProps:C,pure:c,areStatesEqual:l,areOwnPropsEqual:m,areStatePropsEqual:h,areMergedPropsEqual:P},g))}}var re=te();function ne(){return t.useContext(s)}function oe(e){void 0===e&&(e=s);var r=e===s?ne:function(){return t.useContext(e)};return function(){return r().store}}var ue=oe();function ae(e){void 0===e&&(e=s);var t=e===s?ue:oe(e);return function(){return t().dispatch}}var ie=ae(),ce=function(e,t){return e===t};function se(e){void 0===e&&(e=s);var r=e===s?ne:function(){return t.useContext(e)};return function(e,n){void 0===n&&(n=ce);var o=r(),u=function(e,r,n,o){var u,a=t.useReducer(function(e){return e+1},0)[1],i=t.useMemo(function(){return new d(n,o)},[n,o]),c=t.useRef(),s=t.useRef(),f=t.useRef(),p=t.useRef(),l=n.getState();try{u=e!==s.current||l!==f.current||c.current?e(l):p.current}catch(e){throw c.current&&(e.message+="\nThe error may be correlated with this previous error:\n"+c.current.stack+"\n\n"),e}return N(function(){s.current=e,f.current=l,p.current=u,c.current=void 0}),N(function(){function e(){try{var e=s.current(n.getState());if(r(e,p.current))return;p.current=e}catch(e){c.current=e}a()}return i.onStateChange=e,i.trySubscribe(),e(),function(){return i.tryUnsubscribe()}},[n,i]),u}(e,n,o.store,o.subscription);return t.useDebugValue(u),u}}var fe=se();f=n.unstable_batchedUpdates,Object.defineProperty(e,"batch",{enumerable:!0,get:function(){return n.unstable_batchedUpdates}}),e.Provider=function(e){var r=e.store,n=e.context,u=e.children,a=t.useMemo(function(){var e=new d(r);return e.onStateChange=e.notifyNestedSubs,{store:r,subscription:e}},[r]),i=t.useMemo(function(){return r.getState()},[r]);return t.useEffect(function(){var e=a.subscription;return e.trySubscribe(),i!==r.getState()&&e.notifyNestedSubs(),function(){e.tryUnsubscribe(),e.onStateChange=null}},[a,i]),o.createElement((n||s).Provider,{value:a},u)},e.ReactReduxContext=s,e.connect=re,e.connectAdvanced=U,e.createDispatchHook=ae,e.createSelectorHook=se,e.createStoreHook=oe,e.shallowEqual=I,e.useDispatch=ie,e.useSelector=fe,e.useStore=ue,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="undefined"!=typeof globalThis?globalThis:e||self).ReactRedux={},e.React,e.Redux,e.ReactDOM)}(this,(function(e,t,r,n){"use strict";function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=o(t);function a(e,t,r){return e(r={path:t,exports:{},require:function(e,t){return function(){throw Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}()}},r.exports),r.exports}function i(){}function c(){}c.resetWarningCache=i;a((function(e){e.exports=function(){function e(e,t,r,n,o,u){if("SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"!==u){var a=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 a.name="Invariant Violation",a}}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:c,resetWarningCache:i};return r.PropTypes=r,r}()}));var s=u.default.createContext(null);var f=function(e){e()},p=function(){return f},l={notify:function(){}};var d=function(){function e(e,t){this.store=e,this.parentSub=t,this.unsubscribe=null,this.listeners=l,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=p(),t=null,r=null;return{clear:function(){t=null,r=null},notify:function(){e((function(){for(var e=t;e;)e.callback(),e=e.next}))},get:function(){for(var e=[],r=t;r;)e.push(r),r=r.next;return e},subscribe:function(e){var n=!0,o=r={callback:e,next:null,prev:r};return o.prev?o.prev.next=o:t=o,function(){n&&null!==t&&(n=!1,o.next?o.next.prev=o.prev:r=o.prev,o.prev?o.prev.next=o.next:t=o.next)}}}}())},t.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null,this.listeners.clear(),this.listeners=l)},e}();function y(){return(y=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 v(e,t){if(null==e)return{};var r,n,o={},u=Object.keys(e);for(n=0;u.length>n;n++)0>t.indexOf(r=u[n])&&(o[r]=e[r]);return o} | ||
/** @license React v16.13.1 | ||
* react-is.production.min.js | ||
* | ||
* Copyright (c) Facebook, Inc. and its affiliates. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/var m="function"==typeof Symbol&&Symbol.for,b=m?Symbol.for("react.element"):60103,h=m?Symbol.for("react.portal"):60106,S=m?Symbol.for("react.fragment"):60107,P=m?Symbol.for("react.strict_mode"):60108,g=m?Symbol.for("react.profiler"):60114,O=m?Symbol.for("react.provider"):60109,w=m?Symbol.for("react.context"):60110,C=m?Symbol.for("react.async_mode"):60111,x=m?Symbol.for("react.concurrent_mode"):60111,E=m?Symbol.for("react.forward_ref"):60112,T=m?Symbol.for("react.suspense"):60113,M=m?Symbol.for("react.suspense_list"):60120,R=m?Symbol.for("react.memo"):60115,$=m?Symbol.for("react.lazy"):60116,j=m?Symbol.for("react.block"):60121,N=m?Symbol.for("react.fundamental"):60117,q=m?Symbol.for("react.responder"):60118,D=m?Symbol.for("react.scope"):60119;function _(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case b:switch(e=e.type){case C:case x:case S:case g:case P:case T:return e;default:switch(e=e&&e.$$typeof){case w:case E:case $:case R:case O:return e;default:return t}}case h:return t}}}function F(e){return _(e)===x}var k={AsyncMode:C,ConcurrentMode:x,ContextConsumer:w,ContextProvider:O,Element:b,ForwardRef:E,Fragment:S,Lazy:$,Memo:R,Portal:h,Profiler:g,StrictMode:P,Suspense:T,isAsyncMode:function(e){return F(e)||_(e)===C},isConcurrentMode:F,isContextConsumer:function(e){return _(e)===w},isContextProvider:function(e){return _(e)===O},isElement:function(e){return"object"==typeof e&&null!==e&&e.$$typeof===b},isForwardRef:function(e){return _(e)===E},isFragment:function(e){return _(e)===S},isLazy:function(e){return _(e)===$},isMemo:function(e){return _(e)===R},isPortal:function(e){return _(e)===h},isProfiler:function(e){return _(e)===g},isStrictMode:function(e){return _(e)===P},isSuspense:function(e){return _(e)===T},isValidElementType:function(e){return"string"==typeof e||"function"==typeof e||e===S||e===x||e===g||e===P||e===T||e===M||"object"==typeof e&&null!==e&&(e.$$typeof===$||e.$$typeof===R||e.$$typeof===O||e.$$typeof===w||e.$$typeof===E||e.$$typeof===N||e.$$typeof===q||e.$$typeof===D||e.$$typeof===j)},typeOf:_},W=a((function(e){e.exports=k})),H={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},U={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},A={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},I={};function L(e){return W.isMemo(e)?A:I[e.$$typeof]||H}I[W.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},I[W.Memo]=A;var z=Object.defineProperty,K=Object.getOwnPropertyNames,V=Object.getOwnPropertySymbols,B=Object.getOwnPropertyDescriptor,Y=Object.getPrototypeOf,G=Object.prototype;var J=function e(t,r,n){if("string"!=typeof r){if(G){var o=Y(r);o&&o!==G&&e(t,o,n)}var u=K(r);V&&(u=u.concat(V(r)));for(var a=L(t),i=L(r),c=0;u.length>c;++c){var s=u[c];if(!(U[s]||n&&n[s]||i&&i[s]||a&&a[s])){var f=B(r,s);try{z(t,s,f)}catch(e){}}}}return t},Q="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?t.useLayoutEffect:t.useEffect,X=[],Z=[null,null];function ee(e,t){return[t.payload,e[1]+1]}function te(e,t,r){Q((function(){return e.apply(void 0,t)}),r)}function re(e,t,r,n,o,u,a){e.current=n,t.current=o,r.current=!1,u.current&&(u.current=null,a())}function ne(e,t,r,n,o,u,a,i,c,s){if(e){var f=!1,p=null,l=function(){if(!f){var e,r,l=t.getState();try{e=n(l,o.current)}catch(e){r=e,p=e}r||(p=null),e===u.current?a.current||c():(u.current=e,i.current=e,a.current=!0,s({type:"STORE_UPDATED",payload:{error:r}}))}};r.onStateChange=l,r.trySubscribe(),l();return function(){if(f=!0,r.tryUnsubscribe(),r.onStateChange=null,p)throw p}}}var oe=function(){return[null,0]};function ue(e,r){void 0===r&&(r={});var n=r.getDisplayName,o=void 0===n?function(e){return"ConnectAdvanced("+e+")"}:n,a=r.methodName,i=void 0===a?"connectAdvanced":a,c=r.renderCountProp,f=void 0===c?void 0:c,p=r.shouldHandleStateChanges,l=void 0===p||p,m=r.storeKey,b=void 0===m?"store":m,h=r.forwardRef,S=void 0!==h&&h,P=r.context,g=void 0===P?s:P,O=v(r,["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"]),w=g;return function(r){var n=r.displayName||r.name||"Component",a=o(n),c=y({},O,{getDisplayName:o,methodName:i,renderCountProp:f,shouldHandleStateChanges:l,storeKey:b,displayName:a,wrappedComponentName:n,WrappedComponent:r}),s=O.pure;var p=s?t.useMemo:function(e){return e()};function m(n){var o=t.useMemo((function(){var e=n.reactReduxForwardedRef,t=v(n,["reactReduxForwardedRef"]);return[n.context,e,t]}),[n]),a=o[0],i=o[1],s=o[2],f=t.useMemo((function(){return a&&a.Consumer&&W.isContextConsumer(u.default.createElement(a.Consumer,null))?a:w}),[a,w]),m=t.useContext(f),b=!!n.store&&!!n.store.getState&&!!n.store.dispatch,h=b?n.store:m.store,S=t.useMemo((function(){return function(t){return e(t.dispatch,c)}(h)}),[h]),P=t.useMemo((function(){if(!l)return Z;var e=new d(h,b?null:m.subscription),t=e.notifyNestedSubs.bind(e);return[e,t]}),[h,b,m]),g=P[0],O=P[1],C=t.useMemo((function(){return b?m:y({},m,{subscription:g})}),[b,m,g]),x=t.useReducer(ee,X,oe),E=x[0][0],T=x[1];if(E&&E.error)throw E.error;var M=t.useRef(),R=t.useRef(s),$=t.useRef(),j=t.useRef(!1),N=p((function(){return $.current&&s===R.current?$.current:S(h.getState(),s)}),[h,E,s]);te(re,[R,M,j,s,N,$,O]),te(ne,[l,h,g,S,R,M,j,$,O,T],[h,g,S]);var q=t.useMemo((function(){return u.default.createElement(r,y({},N,{ref:i}))}),[i,r,N]);return t.useMemo((function(){return l?u.default.createElement(f.Provider,{value:C},q):q}),[f,q,C])}var h=s?u.default.memo(m):m;if(h.WrappedComponent=r,h.displayName=a,S){var P=u.default.forwardRef((function(e,t){return u.default.createElement(h,y({},e,{reactReduxForwardedRef:t}))}));return P.displayName=a,P.WrappedComponent=r,J(P,r)}return J(h,r)}}function ae(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function ie(e,t){if(ae(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(!Object.prototype.hasOwnProperty.call(t,r[n])||!ae(e[r[n]],t[r[n]]))return!1;return!0}function ce(e){return function(t,r){var n=e(t,r);function o(){return n}return o.dependsOnOwnProps=!1,o}}function se(e){return null!=e.dependsOnOwnProps?!!e.dependsOnOwnProps:1!==e.length}function fe(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=se(e);var o=n(t,r);return"function"==typeof o&&(n.mapToProps=o,n.dependsOnOwnProps=se(o),o=n(t,r)),o},n}}var pe=[function(e){return"function"==typeof e?fe(e):void 0},function(e){return e?void 0:ce((function(e){return{dispatch:e}}))},function(e){return e&&"object"==typeof e?ce((function(t){return r.bindActionCreators(e,t)})):void 0}];var le=[function(e){return"function"==typeof e?fe(e):void 0},function(e){return e?void 0:ce((function(){return{}}))}];function de(e,t,r){return y({},r,e,t)}var ye=[function(e){return"function"==typeof e?function(e){return function(t,r){var n,o=r.pure,u=r.areMergedPropsEqual,a=!1;return function(t,r,i){var c=e(t,r,i);return a?o&&u(c,n)||(n=c):(a=!0,n=c),n}}}(e):void 0},function(e){return e?void 0:function(){return de}}];function ve(e,t,r,n){return function(o,u){return r(e(o,u),t(n,u),u)}}function me(e,t,r,n,o){var u,a,i,c,s,f=o.areStatesEqual,p=o.areOwnPropsEqual,l=o.areStatePropsEqual,d=!1;function y(o,d){var y,v,m=!p(d,a),b=!f(o,u);return u=o,a=d,m&&b?(i=e(u,a),t.dependsOnOwnProps&&(c=t(n,a)),s=r(i,c,a)):m?(e.dependsOnOwnProps&&(i=e(u,a)),t.dependsOnOwnProps&&(c=t(n,a)),s=r(i,c,a)):b?(y=e(u,a),v=!l(y,i),i=y,v&&(s=r(i,c,a)),s):s}return function(o,f){return d?y(o,f):(i=e(u=o,a=f),c=t(n,a),s=r(i,c,a),d=!0,s)}}function be(e,t){var r=t.initMapStateToProps,n=t.initMapDispatchToProps,o=t.initMergeProps,u=v(t,["initMapStateToProps","initMapDispatchToProps","initMergeProps"]),a=r(e,u),i=n(e,u),c=o(e,u);return(u.pure?me:ve)(a,i,c,e,u)}function he(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 Se(e,t){return e===t}function Pe(e){var t=void 0===e?{}:e,r=t.connectHOC,n=void 0===r?ue:r,o=t.mapStateToPropsFactories,u=void 0===o?le:o,a=t.mapDispatchToPropsFactories,i=void 0===a?pe:a,c=t.mergePropsFactories,s=void 0===c?ye:c,f=t.selectorFactory,p=void 0===f?be:f;return function(e,t,r,o){void 0===o&&(o={});var a=o.pure,c=void 0===a||a,f=o.areStatesEqual,l=void 0===f?Se:f,d=o.areOwnPropsEqual,m=void 0===d?ie:d,b=o.areStatePropsEqual,h=void 0===b?ie:b,S=o.areMergedPropsEqual,P=void 0===S?ie:S,g=v(o,["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"]),O=he(e,u,"mapStateToProps"),w=he(t,i,"mapDispatchToProps"),C=he(r,s,"mergeProps");return n(p,y({methodName:"connect",getDisplayName:function(e){return"Connect("+e+")"},shouldHandleStateChanges:!!e,initMapStateToProps:O,initMapDispatchToProps:w,initMergeProps:C,pure:c,areStatesEqual:l,areOwnPropsEqual:m,areStatePropsEqual:h,areMergedPropsEqual:P},g))}}var ge=Pe();function Oe(){return t.useContext(s)}function we(e){void 0===e&&(e=s);var r=e===s?Oe:function(){return t.useContext(e)};return function(){return r().store}}var Ce=we();function xe(e){void 0===e&&(e=s);var t=e===s?Ce:we(e);return function(){return t().dispatch}}var Ee=xe(),Te=function(e,t){return e===t};function Me(e){void 0===e&&(e=s);var r=e===s?Oe:function(){return t.useContext(e)};return function(e,n){void 0===n&&(n=Te);var o=r(),u=function(e,r,n,o){var u,a=t.useReducer((function(e){return e+1}),0)[1],i=t.useMemo((function(){return new d(n,o)}),[n,o]),c=t.useRef(),s=t.useRef(),f=t.useRef(),p=t.useRef(),l=n.getState();try{u=e!==s.current||l!==f.current||c.current?e(l):p.current}catch(e){throw c.current&&(e.message+="\nThe error may be correlated with this previous error:\n"+c.current.stack+"\n\n"),e}return Q((function(){s.current=e,f.current=l,p.current=u,c.current=void 0})),Q((function(){function e(){try{var e=s.current(n.getState());if(r(e,p.current))return;p.current=e}catch(e){c.current=e}a()}return i.onStateChange=e,i.trySubscribe(),e(),function(){return i.tryUnsubscribe()}}),[n,i]),u}(e,n,o.store,o.subscription);return t.useDebugValue(u),u}}var Re=Me();f=n.unstable_batchedUpdates,Object.defineProperty(e,"batch",{enumerable:!0,get:function(){return n.unstable_batchedUpdates}}),e.Provider=function(e){var r=e.store,n=e.context,o=e.children,a=t.useMemo((function(){var e=new d(r);return e.onStateChange=e.notifyNestedSubs,{store:r,subscription:e}}),[r]),i=t.useMemo((function(){return r.getState()}),[r]);return t.useEffect((function(){var e=a.subscription;return e.trySubscribe(),i!==r.getState()&&e.notifyNestedSubs(),function(){e.tryUnsubscribe(),e.onStateChange=null}}),[a,i]),u.default.createElement((n||s).Provider,{value:a},o)},e.ReactReduxContext=s,e.connect=ge,e.connectAdvanced=ue,e.createDispatchHook=xe,e.createSelectorHook=Me,e.createStoreHook=we,e.shallowEqual=ie,e.useDispatch=Ee,e.useSelector=Re,e.useStore=Ce,Object.defineProperty(e,"__esModule",{value:!0})})); |
@@ -130,10 +130,10 @@ import _extends from "@babel/runtime/helpers/esm/extends"; | ||
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 | ||
@@ -235,3 +235,3 @@ selector, otherwise the Connect component will re-render on every state or props change. | ||
// Memoize the check that determines which context instance we should use. | ||
return propsContext && propsContext.Consumer && isContextConsumer(React.createElement(propsContext.Consumer, null)) ? propsContext : Context; | ||
return propsContext && propsContext.Consumer && isContextConsumer( /*#__PURE__*/React.createElement(propsContext.Consumer, null)) ? propsContext : Context; | ||
}, [propsContext, Context]); // Retrieve the store and ancestor subscription via context, if available | ||
@@ -332,3 +332,3 @@ | ||
var renderedWrappedComponent = useMemo(function () { | ||
return React.createElement(WrappedComponent, _extends({}, actualChildProps, { | ||
return /*#__PURE__*/React.createElement(WrappedComponent, _extends({}, actualChildProps, { | ||
ref: reactReduxForwardedRef | ||
@@ -344,3 +344,3 @@ })); | ||
// Context instance, and putting a different value into the context. | ||
return React.createElement(ContextToUse.Provider, { | ||
return /*#__PURE__*/React.createElement(ContextToUse.Provider, { | ||
value: overriddenContextValue | ||
@@ -362,3 +362,3 @@ }, renderedWrappedComponent); | ||
var forwarded = React.forwardRef(function forwardConnectRef(props, ref) { | ||
return React.createElement(Connect, _extends({}, props, { | ||
return /*#__PURE__*/React.createElement(Connect, _extends({}, props, { | ||
reactReduxForwardedRef: ref | ||
@@ -365,0 +365,0 @@ })); |
import React from 'react'; | ||
export var ReactReduxContext = | ||
/*#__PURE__*/ | ||
React.createContext(null); | ||
export var ReactReduxContext = /*#__PURE__*/React.createContext(null); | ||
@@ -6,0 +4,0 @@ if (process.env.NODE_ENV !== 'production') { |
@@ -35,3 +35,3 @@ import React, { useMemo, useEffect } from 'react'; | ||
var Context = context || ReactReduxContext; | ||
return React.createElement(Context.Provider, { | ||
return /*#__PURE__*/React.createElement(Context.Provider, { | ||
value: contextValue | ||
@@ -38,0 +38,0 @@ }, children); |
@@ -98,4 +98,2 @@ import _extends from "@babel/runtime/helpers/esm/extends"; | ||
} | ||
export default | ||
/*#__PURE__*/ | ||
createConnect(); | ||
export default /*#__PURE__*/createConnect(); |
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import verifyPlainObject from '../utils/verifyPlainObject'; | ||
export function defaultMergeProps(stateProps, dispatchProps, ownProps) { | ||
return _extends({}, ownProps, {}, stateProps, {}, dispatchProps); | ||
return _extends({}, ownProps, stateProps, dispatchProps); | ||
} | ||
@@ -6,0 +6,0 @@ export function wrapMergePropsFunc(mergeProps) { |
@@ -43,4 +43,2 @@ import { ReactReduxContext } from '../components/Context'; | ||
export var useDispatch = | ||
/*#__PURE__*/ | ||
createDispatchHook(); | ||
export var useDispatch = /*#__PURE__*/createDispatchHook(); |
@@ -0,0 +0,0 @@ import { useContext } from 'react'; |
@@ -135,4 +135,2 @@ import { useReducer, useRef, useMemo, useContext, useDebugValue } from 'react'; | ||
export var useSelector = | ||
/*#__PURE__*/ | ||
createSelectorHook(); | ||
export var useSelector = /*#__PURE__*/createSelectorHook(); |
@@ -42,4 +42,2 @@ import { useContext } from 'react'; | ||
export var useStore = | ||
/*#__PURE__*/ | ||
createStoreHook(); | ||
export var useStore = /*#__PURE__*/createStoreHook(); |
@@ -0,0 +0,0 @@ /** |
@@ -1,3 +0,3 @@ | ||
/* eslint-disable import/no-unresolved */ | ||
/* eslint-disable import/named */ | ||
import { unstable_batchedUpdates } from 'react-native'; | ||
export { unstable_batchedUpdates }; |
@@ -73,5 +73,3 @@ import { getBatch } from './batch'; // encapsulates the subscription logic for connecting a component to the redux store, as | ||
var Subscription = | ||
/*#__PURE__*/ | ||
function () { | ||
var Subscription = /*#__PURE__*/function () { | ||
function Subscription(store, parentSub) { | ||
@@ -78,0 +76,0 @@ this.store = store; |
@@ -0,0 +0,0 @@ /** |
@@ -147,10 +147,10 @@ "use strict"; | ||
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 | ||
@@ -249,3 +249,3 @@ selector, otherwise the Connect component will re-render on every state or props change. | ||
// Memoize the check that determines which context instance we should use. | ||
return propsContext && propsContext.Consumer && (0, _reactIs.isContextConsumer)(_react["default"].createElement(propsContext.Consumer, null)) ? propsContext : Context; | ||
return propsContext && propsContext.Consumer && (0, _reactIs.isContextConsumer)( /*#__PURE__*/_react["default"].createElement(propsContext.Consumer, null)) ? propsContext : Context; | ||
}, [propsContext, Context]); // Retrieve the store and ancestor subscription via context, if available | ||
@@ -346,3 +346,3 @@ | ||
var renderedWrappedComponent = (0, _react.useMemo)(function () { | ||
return _react["default"].createElement(WrappedComponent, (0, _extends2["default"])({}, actualChildProps, { | ||
return /*#__PURE__*/_react["default"].createElement(WrappedComponent, (0, _extends2["default"])({}, actualChildProps, { | ||
ref: reactReduxForwardedRef | ||
@@ -358,3 +358,3 @@ })); | ||
// Context instance, and putting a different value into the context. | ||
return _react["default"].createElement(ContextToUse.Provider, { | ||
return /*#__PURE__*/_react["default"].createElement(ContextToUse.Provider, { | ||
value: overriddenContextValue | ||
@@ -376,3 +376,3 @@ }, renderedWrappedComponent); | ||
var forwarded = _react["default"].forwardRef(function forwardConnectRef(props, ref) { | ||
return _react["default"].createElement(Connect, (0, _extends2["default"])({}, props, { | ||
return /*#__PURE__*/_react["default"].createElement(Connect, (0, _extends2["default"])({}, props, { | ||
reactReduxForwardedRef: ref | ||
@@ -379,0 +379,0 @@ })); |
@@ -10,5 +10,3 @@ "use strict"; | ||
var ReactReduxContext = | ||
/*#__PURE__*/ | ||
_react["default"].createContext(null); | ||
var ReactReduxContext = /*#__PURE__*/_react["default"].createContext(null); | ||
@@ -15,0 +13,0 @@ exports.ReactReduxContext = ReactReduxContext; |
@@ -47,3 +47,3 @@ "use strict"; | ||
var Context = context || _Context.ReactReduxContext; | ||
return _react["default"].createElement(Context.Provider, { | ||
return /*#__PURE__*/_react["default"].createElement(Context.Provider, { | ||
value: contextValue | ||
@@ -50,0 +50,0 @@ }, children); |
@@ -113,6 +113,4 @@ "use strict"; | ||
var _default = | ||
/*#__PURE__*/ | ||
createConnect(); | ||
var _default = /*#__PURE__*/createConnect(); | ||
exports["default"] = _default; |
@@ -17,3 +17,3 @@ "use strict"; | ||
function defaultMergeProps(stateProps, dispatchProps, ownProps) { | ||
return (0, _extends2["default"])({}, ownProps, {}, stateProps, {}, dispatchProps); | ||
return (0, _extends2["default"])({}, ownProps, stateProps, dispatchProps); | ||
} | ||
@@ -20,0 +20,0 @@ |
@@ -51,5 +51,3 @@ "use strict"; | ||
var useDispatch = | ||
/*#__PURE__*/ | ||
createDispatchHook(); | ||
var useDispatch = /*#__PURE__*/createDispatchHook(); | ||
exports.useDispatch = useDispatch; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -148,5 +148,3 @@ "use strict"; | ||
var useSelector = | ||
/*#__PURE__*/ | ||
createSelectorHook(); | ||
var useSelector = /*#__PURE__*/createSelectorHook(); | ||
exports.useSelector = useSelector; |
@@ -51,5 +51,3 @@ "use strict"; | ||
var useStore = | ||
/*#__PURE__*/ | ||
createStoreHook(); | ||
var useStore = /*#__PURE__*/createStoreHook(); | ||
exports.useStore = useStore; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -79,5 +79,3 @@ "use strict"; | ||
var Subscription = | ||
/*#__PURE__*/ | ||
function () { | ||
var Subscription = /*#__PURE__*/function () { | ||
function Subscription(store, parentSub) { | ||
@@ -84,0 +82,0 @@ this.store = store; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ The MIT License (MIT) |
{ | ||
"name": "react-redux", | ||
"version": "7.2.1", | ||
"version": "7.2.2", | ||
"description": "Official React bindings for Redux", | ||
@@ -39,3 +39,3 @@ "keywords": [ | ||
"peerDependencies": { | ||
"react": "^16.8.3", | ||
"react": "^16.8.3 || ^17", | ||
"redux": "^2.0.0 || ^3.0.0 || ^4.0.0-0" | ||
@@ -52,48 +52,48 @@ }, | ||
"dependencies": { | ||
"@babel/runtime": "^7.5.5", | ||
"hoist-non-react-statics": "^3.3.0", | ||
"@babel/runtime": "^7.12.1", | ||
"hoist-non-react-statics": "^3.3.2", | ||
"loose-envify": "^1.4.0", | ||
"prop-types": "^15.7.2", | ||
"react-is": "^16.9.0" | ||
"react-is": "^16.13.1" | ||
}, | ||
"devDependencies": { | ||
"@babel/cli": "^7.5.5", | ||
"@babel/core": "^7.5.5", | ||
"@babel/plugin-proposal-decorators": "^7.4.4", | ||
"@babel/plugin-proposal-object-rest-spread": "^7.5.5", | ||
"@babel/plugin-transform-react-display-name": "^7.2.0", | ||
"@babel/plugin-transform-react-jsx": "^7.3.0", | ||
"@babel/plugin-transform-runtime": "^7.5.5", | ||
"@babel/preset-env": "^7.5.5", | ||
"@testing-library/jest-dom": "^4.1.0", | ||
"@testing-library/jest-native": "^3.0.2", | ||
"@testing-library/react": "^8.0.8", | ||
"@testing-library/react-hooks": "^1.1.0", | ||
"@testing-library/react-native": "^4.2.0", | ||
"babel-eslint": "^10.0.3", | ||
"babel-jest": "^24.9.0", | ||
"codecov": "^3.5.0", | ||
"create-react-class": "^15.6.3", | ||
"cross-env": "^5.2.0", | ||
"@babel/cli": "^7.12.1", | ||
"@babel/core": "^7.12.3", | ||
"@babel/plugin-proposal-decorators": "^7.12.1", | ||
"@babel/plugin-proposal-object-rest-spread": "^7.12.1", | ||
"@babel/plugin-transform-react-display-name": "^7.12.1", | ||
"@babel/plugin-transform-react-jsx": "^7.12.1", | ||
"@babel/plugin-transform-runtime": "^7.12.1", | ||
"@babel/preset-env": "^7.12.1", | ||
"@rollup/plugin-babel": "^5.2.1", | ||
"@rollup/plugin-commonjs": "^15.1.0", | ||
"@rollup/plugin-node-resolve": "^9.0.0", | ||
"@rollup/plugin-replace": "^2.3.3", | ||
"@testing-library/jest-dom": "^5.11.5", | ||
"@testing-library/jest-native": "^3.4.3", | ||
"@testing-library/react": "^11.1.0", | ||
"@testing-library/react-hooks": "^3.4.2", | ||
"@testing-library/react-native": "^7.1.0", | ||
"babel-eslint": "^10.1.0", | ||
"babel-jest": "^26.6.1", | ||
"codecov": "^3.8.0", | ||
"create-react-class": "^15.7.0", | ||
"cross-env": "^7.0.2", | ||
"es3ify": "^0.2.0", | ||
"eslint": "^6.2.2", | ||
"eslint-config-prettier": "^6.1.0", | ||
"eslint-plugin-import": "^2.18.2", | ||
"eslint-plugin-prettier": "^3.1.0", | ||
"eslint-plugin-react": "^7.14.3", | ||
"glob": "^7.1.4", | ||
"jest": "^24.9.0", | ||
"prettier": "^1.18.2", | ||
"react": "^16.8.6", | ||
"react-dom": "^16.8.6", | ||
"react-native": "^0.61.4", | ||
"react-test-renderer": "^16.8.6", | ||
"redux": "^4.0.4", | ||
"rimraf": "^3.0.0", | ||
"rollup": "^1.20.2", | ||
"rollup-plugin-babel": "^4.3.3", | ||
"rollup-plugin-commonjs": "^10.0.2", | ||
"rollup-plugin-node-resolve": "^5.2.0", | ||
"rollup-plugin-replace": "^2.2.0", | ||
"rollup-plugin-terser": "^5.1.1" | ||
"eslint": "^7.12.0", | ||
"eslint-config-prettier": "^6.14.0", | ||
"eslint-plugin-import": "^2.22.1", | ||
"eslint-plugin-prettier": "^3.1.4", | ||
"eslint-plugin-react": "^7.21.5", | ||
"glob": "^7.1.6", | ||
"jest": "^26.6.1", | ||
"prettier": "^2.1.2", | ||
"react": "^16.14.0", | ||
"react-dom": "^16.14.0", | ||
"react-native": "^0.63.3", | ||
"react-test-renderer": "^16.14.0", | ||
"redux": "^4.0.5", | ||
"rimraf": "^3.0.2", | ||
"rollup": "^2.32.1", | ||
"rollup-plugin-terser": "^7.0.2" | ||
}, | ||
@@ -100,0 +100,0 @@ "browserify": { |
@@ -0,0 +0,0 @@ React Redux |
@@ -25,3 +25,3 @@ import Provider from './components/Provider' | ||
useStore, | ||
shallowEqual | ||
shallowEqual, | ||
} |
@@ -13,3 +13,3 @@ import hoistStatics from 'hoist-non-react-statics' | ||
const stringifyComponent = Comp => { | ||
const stringifyComponent = (Comp) => { | ||
try { | ||
@@ -120,4 +120,4 @@ return JSON.stringify(Comp) | ||
payload: { | ||
error | ||
} | ||
error, | ||
}, | ||
}) | ||
@@ -178,3 +178,3 @@ } | ||
// probably overridden by wrapper functions such as connect() | ||
getDisplayName = name => `ConnectAdvanced(${name})`, | ||
getDisplayName = (name) => `ConnectAdvanced(${name})`, | ||
@@ -263,3 +263,3 @@ // shown in error messages | ||
wrappedComponentName, | ||
WrappedComponent | ||
WrappedComponent, | ||
} | ||
@@ -276,3 +276,3 @@ | ||
// that just executes the given callback immediately. | ||
const usePureOnlyMemo = pure ? useMemo : callback => callback() | ||
const usePureOnlyMemo = pure ? useMemo : (callback) => callback() | ||
@@ -283,3 +283,3 @@ function ConnectFunction(props) { | ||
reactReduxForwardedRef, | ||
wrapperProps | ||
wrapperProps, | ||
] = useMemo(() => { | ||
@@ -373,3 +373,3 @@ // Distinguish between actual "data" props that were passed to the wrapper component, | ||
...contextValue, | ||
subscription | ||
subscription, | ||
} | ||
@@ -382,3 +382,3 @@ }, [didStoreComeFromProps, contextValue, subscription]) | ||
[previousStateUpdateResult], | ||
forceComponentUpdateDispatch | ||
forceComponentUpdateDispatch, | ||
] = useReducer(storeStateUpdatesReducer, EMPTY_ARRAY, initStateUpdates) | ||
@@ -428,3 +428,3 @@ | ||
childPropsFromStoreUpdate, | ||
notifyNestedSubs | ||
notifyNestedSubs, | ||
]) | ||
@@ -445,3 +445,3 @@ | ||
notifyNestedSubs, | ||
forceComponentUpdateDispatch | ||
forceComponentUpdateDispatch, | ||
], | ||
@@ -448,0 +448,0 @@ [store, subscription, childPropsSelector] |
@@ -0,0 +0,0 @@ import React from 'react' |
@@ -12,3 +12,3 @@ import React, { useMemo, useEffect } from 'react' | ||
store, | ||
subscription | ||
subscription, | ||
} | ||
@@ -42,6 +42,6 @@ }, [store]) | ||
dispatch: PropTypes.func.isRequired, | ||
getState: PropTypes.func.isRequired | ||
getState: PropTypes.func.isRequired, | ||
}), | ||
context: PropTypes.object, | ||
children: PropTypes.any | ||
children: PropTypes.any, | ||
} | ||
@@ -48,0 +48,0 @@ } |
@@ -51,3 +51,3 @@ import connectAdvanced from '../components/connectAdvanced' | ||
mergePropsFactories = defaultMergePropsFactories, | ||
selectorFactory = defaultSelectorFactory | ||
selectorFactory = defaultSelectorFactory, | ||
} = {}) { | ||
@@ -84,3 +84,3 @@ return function connect( | ||
// used to compute Connect's displayName from the wrapped component's displayName. | ||
getDisplayName: name => `Connect(${name})`, | ||
getDisplayName: (name) => `Connect(${name})`, | ||
@@ -101,3 +101,3 @@ // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes | ||
// any extra options args can override defaults of connect or connectAdvanced | ||
...extraOptions | ||
...extraOptions, | ||
}) | ||
@@ -104,0 +104,0 @@ } |
@@ -12,3 +12,3 @@ import { bindActionCreators } from 'redux' | ||
return !mapDispatchToProps | ||
? wrapMapToPropsConstant(dispatch => ({ dispatch })) | ||
? wrapMapToPropsConstant((dispatch) => ({ dispatch })) | ||
: undefined | ||
@@ -19,3 +19,3 @@ } | ||
return mapDispatchToProps && typeof mapDispatchToProps === 'object' | ||
? wrapMapToPropsConstant(dispatch => | ||
? wrapMapToPropsConstant((dispatch) => | ||
bindActionCreators(mapDispatchToProps, dispatch) | ||
@@ -29,3 +29,3 @@ ) | ||
whenMapDispatchToPropsIsMissing, | ||
whenMapDispatchToPropsIsObject | ||
whenMapDispatchToPropsIsObject, | ||
] |
@@ -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' |
@@ -0,0 +0,0 @@ import { ReactReduxContext } from '../components/Context' |
@@ -0,0 +0,0 @@ import { useContext } from 'react' |
@@ -15,7 +15,7 @@ import { useReducer, useRef, useMemo, useContext, useDebugValue } from 'react' | ||
) { | ||
const [, forceRender] = useReducer(s => s + 1, 0) | ||
const [, forceRender] = useReducer((s) => s + 1, 0) | ||
const subscription = useMemo(() => new Subscription(store, contextSub), [ | ||
store, | ||
contextSub | ||
contextSub, | ||
]) | ||
@@ -22,0 +22,0 @@ |
@@ -0,0 +0,0 @@ import { useContext } from 'react' |
@@ -28,3 +28,3 @@ import Provider from './components/Provider' | ||
createStoreHook, | ||
shallowEqual | ||
shallowEqual, | ||
} |
@@ -9,5 +9,5 @@ // Default to a dummy "batch" implementation that just runs the callback | ||
// Allow injecting another batching function later | ||
export const setBatch = newBatch => (batch = newBatch) | ||
export const setBatch = (newBatch) => (batch = newBatch) | ||
// Supply a getter just to skip dealing with ESM bindings | ||
export const getBatch = () => batch |
@@ -0,0 +0,0 @@ /** |
/* eslint-disable import/no-unresolved */ | ||
export { unstable_batchedUpdates } from 'react-dom' |
@@ -1,4 +0,4 @@ | ||
/* eslint-disable import/no-unresolved */ | ||
/* eslint-disable import/named */ | ||
import { unstable_batchedUpdates } from 'react-native' | ||
export { unstable_batchedUpdates } |
@@ -0,0 +0,0 @@ function is(x, y) { |
@@ -46,3 +46,3 @@ import { getBatch } from './batch' | ||
next: null, | ||
prev: last | ||
prev: last, | ||
}) | ||
@@ -71,3 +71,3 @@ | ||
} | ||
} | ||
}, | ||
} | ||
@@ -74,0 +74,0 @@ } |
@@ -0,0 +0,0 @@ import { useEffect, useLayoutEffect } from 'react' |
@@ -0,0 +0,0 @@ import { useLayoutEffect } from 'react' |
@@ -0,0 +0,0 @@ import isPlainObject from './isPlainObject' |
@@ -0,0 +0,0 @@ /** |
import { bindActionCreators } from 'redux' | ||
export default function wrapActionCreators(actionCreators) { | ||
return dispatch => bindActionCreators(actionCreators, dispatch) | ||
return (dispatch) => bindActionCreators(actionCreators, dispatch) | ||
} |
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
270653
5678
+ Addedreact@17.0.2(transitive)
- Removedreact@16.14.0(transitive)
Updated@babel/runtime@^7.12.1
Updatedreact-is@^16.13.1