isomorfeus-redux 4.1.18 → 4.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 90b649600d874c4ee1a1aa211440783505cd9f49c32fcc86d3f19d58ad3f91ff
4
- data.tar.gz: 2691fabf451cf7a70d199f22733f7a146823414ce42805b44cc3109e23103b05
3
+ metadata.gz: 682f48e71ab65fc379f01b587c50b7e57702ac8f384ffc9601e5eddb168a52a6
4
+ data.tar.gz: 042dd944df15bb97ae485b3387fdc097d7b0579655e033a3eeaced2a62c9d0cc
5
5
  SHA512:
6
- metadata.gz: ff5d875c014668e3422480edfa3064547ecbc5f6401d77d6062f1895449cddd5da39f5d4293ec8f30c071f22b928f2d85b6fe3ebe8a64ffe812b4257de6c1085
7
- data.tar.gz: 7e79f8f3e07b35b626f3b5f370dc8c6440a31dcd220989b34d5ebdec92a709d33f4b0bfb82098d051a20b268e758233b03c8375936a819a850910ce7ad10cae4
6
+ metadata.gz: fa11f3a04fa2e05153855e6721d3ea6d26e59afd49d589e58237d47740ddf1ef8f0949e9bdaba0e4c24eeba875be99e73baab458f673da0819fab67d3534d4e7
7
+ data.tar.gz: 5edea2b02691953d1868fa3d2333068e98a286f6b6edc522521fa896722b352693c77c35639392ba365161fc143a44ed4df27d764bf94ad16d39c811e64c84ee
data/lib/redux/store.rb CHANGED
@@ -92,13 +92,13 @@ module Redux
92
92
  }
93
93
  }
94
94
  if (enhancer && preloaded_state) {
95
- this.native = ogre.createStore(reducer, preloaded_state, enhancer);
95
+ this.native = ogre.legacy_createStore(reducer, preloaded_state, enhancer);
96
96
  } else if (preloaded_state) {
97
- this.native = ogre.createStore(reducer, preloaded_state);
97
+ this.native = ogre.legacy_createStore(reducer, preloaded_state);
98
98
  } else if (enhancer) {
99
- this.native = ogre.createStore(reducer, enhancer);
99
+ this.native = ogre.legacy_createStore(reducer, enhancer);
100
100
  } else {
101
- this.native = ogre.createStore(reducer);
101
+ this.native = ogre.legacy_createStore(reducer);
102
102
  }
103
103
  }
104
104
  end
data/lib/redux/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Redux
2
- VERSION = '4.1.18'
2
+ VERSION = '4.2.0'
3
3
  end
@@ -1,31 +1,31 @@
1
- {
2
- "name": "isomorfeus-redux",
3
- "lockfileVersion": 2,
4
- "requires": true,
5
- "packages": {
6
- "node_modules/@babel/runtime": {
7
- "version": "7.15.4",
8
- "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.15.4.tgz",
9
- "integrity": "sha512-99catp6bHCaxr4sJ/DbTGgHS4+Rs2RVd2g7iOap6SLGPDknRK9ztKNsE/Fg6QhSeh1FGE5f6gHGQmvvn3I3xhw==",
10
- "dependencies": {
11
- "regenerator-runtime": "^0.13.4"
12
- },
13
- "engines": {
14
- "node": ">=6.9.0"
15
- }
16
- },
17
- "node_modules/redux": {
18
- "version": "4.1.2",
19
- "resolved": "https://registry.npmjs.org/redux/-/redux-4.1.2.tgz",
20
- "integrity": "sha512-SH8PglcebESbd/shgf6mii6EIoRM0zrQyjcuQ+ojmfxjTtE0z9Y8pa62iA/OJ58qjP6j27uyW4kUF4jl/jd6sw==",
21
- "dependencies": {
22
- "@babel/runtime": "^7.9.2"
23
- }
24
- },
25
- "node_modules/regenerator-runtime": {
26
- "version": "0.13.9",
27
- "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz",
28
- "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA=="
29
- }
30
- }
31
- }
1
+ {
2
+ "name": "isomorfeus-redux",
3
+ "lockfileVersion": 2,
4
+ "requires": true,
5
+ "packages": {
6
+ "node_modules/@babel/runtime": {
7
+ "version": "7.15.4",
8
+ "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.15.4.tgz",
9
+ "integrity": "sha512-99catp6bHCaxr4sJ/DbTGgHS4+Rs2RVd2g7iOap6SLGPDknRK9ztKNsE/Fg6QhSeh1FGE5f6gHGQmvvn3I3xhw==",
10
+ "dependencies": {
11
+ "regenerator-runtime": "^0.13.4"
12
+ },
13
+ "engines": {
14
+ "node": ">=6.9.0"
15
+ }
16
+ },
17
+ "node_modules/redux": {
18
+ "version": "4.2.0",
19
+ "resolved": "https://registry.npmjs.org/redux/-/redux-4.2.0.tgz",
20
+ "integrity": "sha512-oSBmcKKIuIR4ME29/AeNUnl5L+hvBq7OaJWzaptTQJAntaPvxIJqfnjbaEiCzzaIz+XmVILfqAM3Ob0aXLPfjA==",
21
+ "dependencies": {
22
+ "@babel/runtime": "^7.9.2"
23
+ }
24
+ },
25
+ "node_modules/regenerator-runtime": {
26
+ "version": "0.13.9",
27
+ "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz",
28
+ "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA=="
29
+ }
30
+ }
31
+ }
@@ -102,29 +102,29 @@ function kindOf(val) {
102
102
  }
103
103
 
104
104
  /**
105
- * Creates a Redux store that holds the state tree.
106
- * The only way to change the data in the store is to call `dispatch()` on it.
105
+ * @deprecated
107
106
  *
108
- * There should only be a single store in your app. To specify how different
109
- * parts of the state tree respond to actions, you may combine several reducers
110
- * into a single reducer function by using `combineReducers`.
107
+ * **We recommend using the `configureStore` method
108
+ * of the `@reduxjs/toolkit` package**, which replaces `createStore`.
111
109
  *
112
- * @param {Function} reducer A function that returns the next state tree, given
113
- * the current state tree and the action to handle.
110
+ * Redux Toolkit is our recommended approach for writing Redux logic today,
111
+ * including store setup, reducers, data fetching, and more.
114
112
  *
115
- * @param {any} [preloadedState] The initial state. You may optionally specify it
116
- * to hydrate the state from the server in universal apps, or to restore a
117
- * previously serialized user session.
118
- * If you use `combineReducers` to produce the root reducer function, this must be
119
- * an object with the same shape as `combineReducers` keys.
113
+ * **For more details, please read this Redux docs page:**
114
+ * **https://redux.js.org/introduction/why-rtk-is-redux-today**
120
115
  *
121
- * @param {Function} [enhancer] The store enhancer. You may optionally specify it
122
- * to enhance the store with third-party capabilities such as middleware,
123
- * time travel, persistence, etc. The only store enhancer that ships with Redux
124
- * is `applyMiddleware()`.
116
+ * `configureStore` from Redux Toolkit is an improved version of `createStore` that
117
+ * simplifies setup and helps avoid common bugs.
118
+ *
119
+ * You should not be using the `redux` core package by itself today, except for learning purposes.
120
+ * The `createStore` method from the core `redux` package will not be removed, but we encourage
121
+ * all users to migrate to using Redux Toolkit for all Redux code.
122
+ *
123
+ * If you want to use `createStore` without this visual deprecation warning, use
124
+ * the `legacy_createStore` import instead:
125
+ *
126
+ * `import { legacy_createStore as createStore} from 'redux'`
125
127
  *
126
- * @returns {Store} A Redux store that lets you read the state, dispatch actions
127
- * and subscribe to changes.
128
128
  */
129
129
 
130
130
  function createStore(reducer, preloadedState, enhancer) {
@@ -374,6 +374,38 @@ function createStore(reducer, preloadedState, enhancer) {
374
374
  replaceReducer: replaceReducer
375
375
  }, _ref2[$$observable] = observable, _ref2;
376
376
  }
377
+ /**
378
+ * Creates a Redux store that holds the state tree.
379
+ *
380
+ * **We recommend using `configureStore` from the
381
+ * `@reduxjs/toolkit` package**, which replaces `createStore`:
382
+ * **https://redux.js.org/introduction/why-rtk-is-redux-today**
383
+ *
384
+ * The only way to change the data in the store is to call `dispatch()` on it.
385
+ *
386
+ * There should only be a single store in your app. To specify how different
387
+ * parts of the state tree respond to actions, you may combine several reducers
388
+ * into a single reducer function by using `combineReducers`.
389
+ *
390
+ * @param {Function} reducer A function that returns the next state tree, given
391
+ * the current state tree and the action to handle.
392
+ *
393
+ * @param {any} [preloadedState] The initial state. You may optionally specify it
394
+ * to hydrate the state from the server in universal apps, or to restore a
395
+ * previously serialized user session.
396
+ * If you use `combineReducers` to produce the root reducer function, this must be
397
+ * an object with the same shape as `combineReducers` keys.
398
+ *
399
+ * @param {Function} [enhancer] The store enhancer. You may optionally specify it
400
+ * to enhance the store with third-party capabilities such as middleware,
401
+ * time travel, persistence, etc. The only store enhancer that ships with Redux
402
+ * is `applyMiddleware()`.
403
+ *
404
+ * @returns {Store} A Redux store that lets you read the state, dispatch actions
405
+ * and subscribe to changes.
406
+ */
407
+
408
+ var legacy_createStore = createStore;
377
409
 
378
410
  /**
379
411
  * Prints a warning in the console if it exists.
@@ -729,6 +761,7 @@ exports.bindActionCreators = bindActionCreators;
729
761
  exports.combineReducers = combineReducers;
730
762
  exports.compose = compose;
731
763
  exports.createStore = createStore;
764
+ exports.legacy_createStore = legacy_createStore;
732
765
 
733
766
  Object.defineProperty(exports, '__esModule', { value: true });
734
767
 
@@ -1 +1 @@
1
- !function(r,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((r="undefined"!=typeof globalThis?globalThis:r||self).Redux={})}(this,(function(r){"use strict";function t(r){return"Minified Redux error #"+r+"; visit https://redux.js.org/Errors?code="+r+" for the full message or use the non-minified dev environment for full errors. "}var e="function"==typeof Symbol&&Symbol.observable||"@@observable",n=function(){return Math.random().toString(36).substring(7).split("").join(".")},o={INIT:"@@redux/INIT"+n(),REPLACE:"@@redux/REPLACE"+n(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+n()}};function i(r){if("object"!=typeof r||null===r)return!1;for(var t=r;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(r)===t}function f(r,t){return function(){return t(r.apply(this,arguments))}}function u(r,t,e){return t in r?Object.defineProperty(r,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):r[t]=e,r}function c(r,t){var e=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable}))),e.push.apply(e,n)}return e}function p(r){for(var t=1;arguments.length>t;t++){var e=null!=arguments[t]?arguments[t]:{};t%2?c(Object(e),!0).forEach((function(t){u(r,t,e[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(e)):c(Object(e)).forEach((function(t){Object.defineProperty(r,t,Object.getOwnPropertyDescriptor(e,t))}))}return r}function a(){for(var r=arguments.length,t=Array(r),e=0;r>e;e++)t[e]=arguments[e];return 0===t.length?function(r){return r}:1===t.length?t[0]:t.reduce((function(r,t){return function(){return r(t.apply(void 0,arguments))}}))}r.__DO_NOT_USE__ActionTypes=o,r.applyMiddleware=function(){for(var r=arguments.length,e=Array(r),n=0;r>n;n++)e[n]=arguments[n];return function(r){return function(){var n=r.apply(void 0,arguments),o=function(){throw Error(t(15))},i={getState:n.getState,dispatch:function(){return o.apply(void 0,arguments)}},f=e.map((function(r){return r(i)}));return o=a.apply(void 0,f)(n.dispatch),p(p({},n),{},{dispatch:o})}}},r.bindActionCreators=function(r,e){if("function"==typeof r)return f(r,e);if("object"!=typeof r||null===r)throw Error(t(16));var n={};for(var o in r){var i=r[o];"function"==typeof i&&(n[o]=f(i,e))}return n},r.combineReducers=function(r){for(var e=Object.keys(r),n={},i=0;e.length>i;i++){var f=e[i];"function"==typeof r[f]&&(n[f]=r[f])}var u,c=Object.keys(n);try{!function(r){Object.keys(r).forEach((function(e){var n=r[e];if(void 0===n(void 0,{type:o.INIT}))throw Error(t(12));if(void 0===n(void 0,{type:o.PROBE_UNKNOWN_ACTION()}))throw Error(t(13))}))}(n)}catch(r){u=r}return function(r,e){if(void 0===r&&(r={}),u)throw u;for(var o=!1,i={},f=0;c.length>f;f++){var p=c[f],a=r[p],l=(0,n[p])(a,e);if(void 0===l)throw Error(t(14));i[p]=l,o=o||l!==a}return(o=o||c.length!==Object.keys(r).length)?i:r}},r.compose=a,r.createStore=function r(n,f,u){var c;if("function"==typeof f&&"function"==typeof u||"function"==typeof u&&"function"==typeof arguments[3])throw Error(t(0));if("function"==typeof f&&void 0===u&&(u=f,f=void 0),void 0!==u){if("function"!=typeof u)throw Error(t(1));return u(r)(n,f)}if("function"!=typeof n)throw Error(t(2));var p=n,a=f,l=[],y=l,s=!1;function d(){y===l&&(y=l.slice())}function b(){if(s)throw Error(t(3));return a}function h(r){if("function"!=typeof r)throw Error(t(4));if(s)throw Error(t(5));var e=!0;return d(),y.push(r),function(){if(e){if(s)throw Error(t(6));e=!1,d();var n=y.indexOf(r);y.splice(n,1),l=null}}}function v(r){if(!i(r))throw Error(t(7));if(void 0===r.type)throw Error(t(8));if(s)throw Error(t(9));try{s=!0,a=p(a,r)}finally{s=!1}for(var e=l=y,n=0;e.length>n;n++){(0,e[n])()}return r}function O(r){if("function"!=typeof r)throw Error(t(10));p=r,v({type:o.REPLACE})}function E(){var r,n=h;return(r={subscribe:function(r){if("object"!=typeof r||null===r)throw Error(t(11));function e(){r.next&&r.next(b())}return e(),{unsubscribe:n(e)}}})[e]=function(){return this},r}return v({type:o.INIT}),(c={dispatch:v,subscribe:h,getState:b,replaceReducer:O})[e]=E,c},Object.defineProperty(r,"__esModule",{value:!0})}));
1
+ !function(r,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((r="undefined"!=typeof globalThis?globalThis:r||self).Redux={})}(this,(function(r){"use strict";function t(r){return"Minified Redux error #"+r+"; visit https://redux.js.org/Errors?code="+r+" for the full message or use the non-minified dev environment for full errors. "}var e="function"==typeof Symbol&&Symbol.observable||"@@observable",n=function(){return Math.random().toString(36).substring(7).split("").join(".")},o={INIT:"@@redux/INIT"+n(),REPLACE:"@@redux/REPLACE"+n(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+n()}};function i(r){if("object"!=typeof r||null===r)return!1;for(var t=r;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(r)===t}function f(r,n,u){var c;if("function"==typeof n&&"function"==typeof u||"function"==typeof u&&"function"==typeof arguments[3])throw Error(t(0));if("function"==typeof n&&void 0===u&&(u=n,n=void 0),void 0!==u){if("function"!=typeof u)throw Error(t(1));return u(f)(r,n)}if("function"!=typeof r)throw Error(t(2));var p=r,a=n,l=[],y=l,s=!1;function d(){y===l&&(y=l.slice())}function b(){if(s)throw Error(t(3));return a}function h(r){if("function"!=typeof r)throw Error(t(4));if(s)throw Error(t(5));var e=!0;return d(),y.push(r),function(){if(e){if(s)throw Error(t(6));e=!1,d();var n=y.indexOf(r);y.splice(n,1),l=null}}}function v(r){if(!i(r))throw Error(t(7));if(void 0===r.type)throw Error(t(8));if(s)throw Error(t(9));try{s=!0,a=p(a,r)}finally{s=!1}for(var e=l=y,n=0;e.length>n;n++){(0,e[n])()}return r}function O(r){if("function"!=typeof r)throw Error(t(10));p=r,v({type:o.REPLACE})}function E(){var r,n=h;return(r={subscribe:function(r){if("object"!=typeof r||null===r)throw Error(t(11));function e(){r.next&&r.next(b())}return e(),{unsubscribe:n(e)}}})[e]=function(){return this},r}return v({type:o.INIT}),(c={dispatch:v,subscribe:h,getState:b,replaceReducer:O})[e]=E,c}var u=f;function c(r,t){return function(){return t(r.apply(this,arguments))}}function p(r,t,e){return t in r?Object.defineProperty(r,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):r[t]=e,r}function a(r,t){var e=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable}))),e.push.apply(e,n)}return e}function l(r){for(var t=1;arguments.length>t;t++){var e=null!=arguments[t]?arguments[t]:{};t%2?a(Object(e),!0).forEach((function(t){p(r,t,e[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(e)):a(Object(e)).forEach((function(t){Object.defineProperty(r,t,Object.getOwnPropertyDescriptor(e,t))}))}return r}function y(){for(var r=arguments.length,t=Array(r),e=0;r>e;e++)t[e]=arguments[e];return 0===t.length?function(r){return r}:1===t.length?t[0]:t.reduce((function(r,t){return function(){return r(t.apply(void 0,arguments))}}))}r.__DO_NOT_USE__ActionTypes=o,r.applyMiddleware=function(){for(var r=arguments.length,e=Array(r),n=0;r>n;n++)e[n]=arguments[n];return function(r){return function(){var n=r.apply(void 0,arguments),o=function(){throw Error(t(15))},i={getState:n.getState,dispatch:function(){return o.apply(void 0,arguments)}},f=e.map((function(r){return r(i)}));return o=y.apply(void 0,f)(n.dispatch),l(l({},n),{},{dispatch:o})}}},r.bindActionCreators=function(r,e){if("function"==typeof r)return c(r,e);if("object"!=typeof r||null===r)throw Error(t(16));var n={};for(var o in r){var i=r[o];"function"==typeof i&&(n[o]=c(i,e))}return n},r.combineReducers=function(r){for(var e=Object.keys(r),n={},i=0;e.length>i;i++){var f=e[i];"function"==typeof r[f]&&(n[f]=r[f])}var u,c=Object.keys(n);try{!function(r){Object.keys(r).forEach((function(e){var n=r[e];if(void 0===n(void 0,{type:o.INIT}))throw Error(t(12));if(void 0===n(void 0,{type:o.PROBE_UNKNOWN_ACTION()}))throw Error(t(13))}))}(n)}catch(r){u=r}return function(r,e){if(void 0===r&&(r={}),u)throw u;for(var o=!1,i={},f=0;c.length>f;f++){var p=c[f],a=r[p],l=(0,n[p])(a,e);if(void 0===l)throw Error(t(14));i[p]=l,o=o||l!==a}return(o=o||c.length!==Object.keys(r).length)?i:r}},r.compose=y,r.createStore=f,r.legacy_createStore=u,Object.defineProperty(r,"__esModule",{value:!0})}));
@@ -109,29 +109,29 @@ function kindOf(val) {
109
109
  }
110
110
 
111
111
  /**
112
- * Creates a Redux store that holds the state tree.
113
- * The only way to change the data in the store is to call `dispatch()` on it.
112
+ * @deprecated
114
113
  *
115
- * There should only be a single store in your app. To specify how different
116
- * parts of the state tree respond to actions, you may combine several reducers
117
- * into a single reducer function by using `combineReducers`.
114
+ * **We recommend using the `configureStore` method
115
+ * of the `@reduxjs/toolkit` package**, which replaces `createStore`.
118
116
  *
119
- * @param {Function} reducer A function that returns the next state tree, given
120
- * the current state tree and the action to handle.
117
+ * Redux Toolkit is our recommended approach for writing Redux logic today,
118
+ * including store setup, reducers, data fetching, and more.
121
119
  *
122
- * @param {any} [preloadedState] The initial state. You may optionally specify it
123
- * to hydrate the state from the server in universal apps, or to restore a
124
- * previously serialized user session.
125
- * If you use `combineReducers` to produce the root reducer function, this must be
126
- * an object with the same shape as `combineReducers` keys.
120
+ * **For more details, please read this Redux docs page:**
121
+ * **https://redux.js.org/introduction/why-rtk-is-redux-today**
127
122
  *
128
- * @param {Function} [enhancer] The store enhancer. You may optionally specify it
129
- * to enhance the store with third-party capabilities such as middleware,
130
- * time travel, persistence, etc. The only store enhancer that ships with Redux
131
- * is `applyMiddleware()`.
123
+ * `configureStore` from Redux Toolkit is an improved version of `createStore` that
124
+ * simplifies setup and helps avoid common bugs.
125
+ *
126
+ * You should not be using the `redux` core package by itself today, except for learning purposes.
127
+ * The `createStore` method from the core `redux` package will not be removed, but we encourage
128
+ * all users to migrate to using Redux Toolkit for all Redux code.
129
+ *
130
+ * If you want to use `createStore` without this visual deprecation warning, use
131
+ * the `legacy_createStore` import instead:
132
+ *
133
+ * `import { legacy_createStore as createStore} from 'redux'`
132
134
  *
133
- * @returns {Store} A Redux store that lets you read the state, dispatch actions
134
- * and subscribe to changes.
135
135
  */
136
136
 
137
137
  function createStore(reducer, preloadedState, enhancer) {
@@ -381,6 +381,38 @@ function createStore(reducer, preloadedState, enhancer) {
381
381
  replaceReducer: replaceReducer
382
382
  }, _ref2[$$observable] = observable, _ref2;
383
383
  }
384
+ /**
385
+ * Creates a Redux store that holds the state tree.
386
+ *
387
+ * **We recommend using `configureStore` from the
388
+ * `@reduxjs/toolkit` package**, which replaces `createStore`:
389
+ * **https://redux.js.org/introduction/why-rtk-is-redux-today**
390
+ *
391
+ * The only way to change the data in the store is to call `dispatch()` on it.
392
+ *
393
+ * There should only be a single store in your app. To specify how different
394
+ * parts of the state tree respond to actions, you may combine several reducers
395
+ * into a single reducer function by using `combineReducers`.
396
+ *
397
+ * @param {Function} reducer A function that returns the next state tree, given
398
+ * the current state tree and the action to handle.
399
+ *
400
+ * @param {any} [preloadedState] The initial state. You may optionally specify it
401
+ * to hydrate the state from the server in universal apps, or to restore a
402
+ * previously serialized user session.
403
+ * If you use `combineReducers` to produce the root reducer function, this must be
404
+ * an object with the same shape as `combineReducers` keys.
405
+ *
406
+ * @param {Function} [enhancer] The store enhancer. You may optionally specify it
407
+ * to enhance the store with third-party capabilities such as middleware,
408
+ * time travel, persistence, etc. The only store enhancer that ships with Redux
409
+ * is `applyMiddleware()`.
410
+ *
411
+ * @returns {Store} A Redux store that lets you read the state, dispatch actions
412
+ * and subscribe to changes.
413
+ */
414
+
415
+ var legacy_createStore = createStore;
384
416
 
385
417
  /**
386
418
  * Prints a warning in the console if it exists.
@@ -681,4 +713,4 @@ if (process.env.NODE_ENV !== 'production' && typeof isCrushed.name === 'string'
681
713
  warning('You are currently using minified code outside of NODE_ENV === "production". ' + 'This means that you are running a slower development build of Redux. ' + 'You can use loose-envify (https://github.com/zertosh/loose-envify) for browserify ' + 'or setting mode to production in webpack (https://webpack.js.org/concepts/mode/) ' + 'to ensure you have the correct code for your production build.');
682
714
  }
683
715
 
684
- export { ActionTypes as __DO_NOT_USE__ActionTypes, applyMiddleware, bindActionCreators, combineReducers, compose, createStore };
716
+ export { ActionTypes as __DO_NOT_USE__ActionTypes, applyMiddleware, bindActionCreators, combineReducers, compose, createStore, legacy_createStore };
@@ -1 +1 @@
1
- function r(r){return"Minified Redux error #"+r+"; visit https://redux.js.org/Errors?code="+r+" for the full message or use the non-minified dev environment for full errors. "}var t="function"==typeof Symbol&&Symbol.observable||"@@observable",n=function(){return Math.random().toString(36).substring(7).split("").join(".")},e={INIT:"@@redux/INIT"+n(),REPLACE:"@@redux/REPLACE"+n(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+n()}};function o(r){if("object"!=typeof r||null===r)return!1;for(var t=r;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(r)===t}function i(n,f,u){var c;if("function"==typeof f&&"function"==typeof u||"function"==typeof u&&"function"==typeof arguments[3])throw Error(r(0));if("function"==typeof f&&void 0===u&&(u=f,f=void 0),void 0!==u){if("function"!=typeof u)throw Error(r(1));return u(i)(n,f)}if("function"!=typeof n)throw Error(r(2));var p=n,a=f,y=[],l=y,s=!1;function h(){l===y&&(l=y.slice())}function v(){if(s)throw Error(r(3));return a}function b(t){if("function"!=typeof t)throw Error(r(4));if(s)throw Error(r(5));var n=!0;return h(),l.push(t),function(){if(n){if(s)throw Error(r(6));n=!1,h();var e=l.indexOf(t);l.splice(e,1),y=null}}}function O(t){if(!o(t))throw Error(r(7));if(void 0===t.type)throw Error(r(8));if(s)throw Error(r(9));try{s=!0,a=p(a,t)}finally{s=!1}for(var n=y=l,e=0;n.length>e;e++){(0,n[e])()}return t}function d(t){if("function"!=typeof t)throw Error(r(10));p=t,O({type:e.REPLACE})}function E(){var n,e=b;return(n={subscribe:function(t){if("object"!=typeof t||null===t)throw Error(r(11));function n(){t.next&&t.next(v())}return n(),{unsubscribe:e(n)}}})[t]=function(){return this},n}return O({type:e.INIT}),(c={dispatch:O,subscribe:b,getState:v,replaceReducer:d})[t]=E,c}function f(t){for(var n=Object.keys(t),o={},i=0;n.length>i;i++){var f=n[i];"function"==typeof t[f]&&(o[f]=t[f])}var u,c=Object.keys(o);try{!function(t){Object.keys(t).forEach((function(n){var o=t[n];if(void 0===o(void 0,{type:e.INIT}))throw Error(r(12));if(void 0===o(void 0,{type:e.PROBE_UNKNOWN_ACTION()}))throw Error(r(13))}))}(o)}catch(r){u=r}return function(t,n){if(void 0===t&&(t={}),u)throw u;for(var e=!1,i={},f=0;c.length>f;f++){var p=c[f],a=t[p],y=(0,o[p])(a,n);if(void 0===y)throw Error(r(14));i[p]=y,e=e||y!==a}return(e=e||c.length!==Object.keys(t).length)?i:t}}function u(r,t){return function(){return t(r.apply(this,arguments))}}function c(t,n){if("function"==typeof t)return u(t,n);if("object"!=typeof t||null===t)throw Error(r(16));var e={};for(var o in t){var i=t[o];"function"==typeof i&&(e[o]=u(i,n))}return e}function p(r,t,n){return t in r?Object.defineProperty(r,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):r[t]=n,r}function a(r,t){var n=Object.keys(r);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(r);t&&(e=e.filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable}))),n.push.apply(n,e)}return n}function y(r){for(var t=1;arguments.length>t;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){p(r,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(r,t,Object.getOwnPropertyDescriptor(n,t))}))}return r}function l(){for(var r=arguments.length,t=Array(r),n=0;r>n;n++)t[n]=arguments[n];return 0===t.length?function(r){return r}:1===t.length?t[0]:t.reduce((function(r,t){return function(){return r(t.apply(void 0,arguments))}}))}function s(){for(var t=arguments.length,n=Array(t),e=0;t>e;e++)n[e]=arguments[e];return function(t){return function(){var e=t.apply(void 0,arguments),o=function(){throw Error(r(15))},i={getState:e.getState,dispatch:function(){return o.apply(void 0,arguments)}},f=n.map((function(r){return r(i)}));return o=l.apply(void 0,f)(e.dispatch),y(y({},e),{},{dispatch:o})}}}export{e as __DO_NOT_USE__ActionTypes,s as applyMiddleware,c as bindActionCreators,f as combineReducers,l as compose,i as createStore};
1
+ function r(r){return"Minified Redux error #"+r+"; visit https://redux.js.org/Errors?code="+r+" for the full message or use the non-minified dev environment for full errors. "}var t="function"==typeof Symbol&&Symbol.observable||"@@observable",n=function(){return Math.random().toString(36).substring(7).split("").join(".")},e={INIT:"@@redux/INIT"+n(),REPLACE:"@@redux/REPLACE"+n(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+n()}};function o(r){if("object"!=typeof r||null===r)return!1;for(var t=r;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(r)===t}function i(n,f,u){var c;if("function"==typeof f&&"function"==typeof u||"function"==typeof u&&"function"==typeof arguments[3])throw Error(r(0));if("function"==typeof f&&void 0===u&&(u=f,f=void 0),void 0!==u){if("function"!=typeof u)throw Error(r(1));return u(i)(n,f)}if("function"!=typeof n)throw Error(r(2));var p=n,a=f,y=[],l=y,s=!1;function v(){l===y&&(l=y.slice())}function h(){if(s)throw Error(r(3));return a}function b(t){if("function"!=typeof t)throw Error(r(4));if(s)throw Error(r(5));var n=!0;return v(),l.push(t),function(){if(n){if(s)throw Error(r(6));n=!1,v();var e=l.indexOf(t);l.splice(e,1),y=null}}}function O(t){if(!o(t))throw Error(r(7));if(void 0===t.type)throw Error(r(8));if(s)throw Error(r(9));try{s=!0,a=p(a,t)}finally{s=!1}for(var n=y=l,e=0;n.length>e;e++){(0,n[e])()}return t}function d(t){if("function"!=typeof t)throw Error(r(10));p=t,O({type:e.REPLACE})}function E(){var n,e=b;return(n={subscribe:function(t){if("object"!=typeof t||null===t)throw Error(r(11));function n(){t.next&&t.next(h())}return n(),{unsubscribe:e(n)}}})[t]=function(){return this},n}return O({type:e.INIT}),(c={dispatch:O,subscribe:b,getState:h,replaceReducer:d})[t]=E,c}var f=i;function u(t){for(var n=Object.keys(t),o={},i=0;n.length>i;i++){var f=n[i];"function"==typeof t[f]&&(o[f]=t[f])}var u,c=Object.keys(o);try{!function(t){Object.keys(t).forEach((function(n){var o=t[n];if(void 0===o(void 0,{type:e.INIT}))throw Error(r(12));if(void 0===o(void 0,{type:e.PROBE_UNKNOWN_ACTION()}))throw Error(r(13))}))}(o)}catch(r){u=r}return function(t,n){if(void 0===t&&(t={}),u)throw u;for(var e=!1,i={},f=0;c.length>f;f++){var p=c[f],a=t[p],y=(0,o[p])(a,n);if(void 0===y)throw Error(r(14));i[p]=y,e=e||y!==a}return(e=e||c.length!==Object.keys(t).length)?i:t}}function c(r,t){return function(){return t(r.apply(this,arguments))}}function p(t,n){if("function"==typeof t)return c(t,n);if("object"!=typeof t||null===t)throw Error(r(16));var e={};for(var o in t){var i=t[o];"function"==typeof i&&(e[o]=c(i,n))}return e}function a(r,t,n){return t in r?Object.defineProperty(r,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):r[t]=n,r}function y(r,t){var n=Object.keys(r);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(r);t&&(e=e.filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable}))),n.push.apply(n,e)}return n}function l(r){for(var t=1;arguments.length>t;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?y(Object(n),!0).forEach((function(t){a(r,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):y(Object(n)).forEach((function(t){Object.defineProperty(r,t,Object.getOwnPropertyDescriptor(n,t))}))}return r}function s(){for(var r=arguments.length,t=Array(r),n=0;r>n;n++)t[n]=arguments[n];return 0===t.length?function(r){return r}:1===t.length?t[0]:t.reduce((function(r,t){return function(){return r(t.apply(void 0,arguments))}}))}function v(){for(var t=arguments.length,n=Array(t),e=0;t>e;e++)n[e]=arguments[e];return function(t){return function(){var e=t.apply(void 0,arguments),o=function(){throw Error(r(15))},i={getState:e.getState,dispatch:function(){return o.apply(void 0,arguments)}},f=n.map((function(r){return r(i)}));return o=s.apply(void 0,f)(e.dispatch),l(l({},e),{},{dispatch:o})}}}export{e as __DO_NOT_USE__ActionTypes,v as applyMiddleware,p as bindActionCreators,u as combineReducers,s as compose,i as createStore,f as legacy_createStore};
@@ -371,35 +371,135 @@ export interface StoreCreator {
371
371
  ): Store<S & StateExt, A> & Ext
372
372
  }
373
373
 
374
+ /**
375
+ * @deprecated
376
+ *
377
+ * **We recommend using the `configureStore` method
378
+ * of the `@reduxjs/toolkit` package**, which replaces `createStore`.
379
+ *
380
+ * Redux Toolkit is our recommended approach for writing Redux logic today,
381
+ * including store setup, reducers, data fetching, and more.
382
+ *
383
+ * **For more details, please read this Redux docs page:**
384
+ * **https://redux.js.org/introduction/why-rtk-is-redux-today**
385
+ *
386
+ * `configureStore` from Redux Toolkit is an improved version of `createStore` that
387
+ * simplifies setup and helps avoid common bugs.
388
+ *
389
+ * You should not be using the `redux` core package by itself today, except for learning purposes.
390
+ * The `createStore` method from the core `redux` package will not be removed, but we encourage
391
+ * all users to migrate to using Redux Toolkit for all Redux code.
392
+ *
393
+ * If you want to use `createStore` without this visual deprecation warning, use
394
+ * the `legacy_createStore` import instead:
395
+ *
396
+ * `import { legacy_createStore as createStore} from 'redux'`
397
+ *
398
+ */
399
+ export declare function createStore<S, A extends Action, Ext, StateExt>(
400
+ reducer: Reducer<S, A>,
401
+ enhancer?: StoreEnhancer<Ext, StateExt>
402
+ ): Store<S & StateExt, A> & Ext
403
+ /**
404
+ * @deprecated
405
+ *
406
+ * **We recommend using the `configureStore` method
407
+ * of the `@reduxjs/toolkit` package**, which replaces `createStore`.
408
+ *
409
+ * Redux Toolkit is our recommended approach for writing Redux logic today,
410
+ * including store setup, reducers, data fetching, and more.
411
+ *
412
+ * **For more details, please read this Redux docs page:**
413
+ * **https://redux.js.org/introduction/why-rtk-is-redux-today**
414
+ *
415
+ * `configureStore` from Redux Toolkit is an improved version of `createStore` that
416
+ * simplifies setup and helps avoid common bugs.
417
+ *
418
+ * You should not be using the `redux` core package by itself today, except for learning purposes.
419
+ * The `createStore` method from the core `redux` package will not be removed, but we encourage
420
+ * all users to migrate to using Redux Toolkit for all Redux code.
421
+ *
422
+ * If you want to use `createStore` without this visual deprecation warning, use
423
+ * the `legacy_createStore` import instead:
424
+ *
425
+ * `import { legacy_createStore as createStore} from 'redux'`
426
+ *
427
+ */
428
+ export declare function createStore<S, A extends Action, Ext, StateExt>(
429
+ reducer: Reducer<S, A>,
430
+ preloadedState?: PreloadedState<S>,
431
+ enhancer?: StoreEnhancer<Ext>
432
+ ): Store<S & StateExt, A> & Ext
433
+
374
434
  /**
375
435
  * Creates a Redux store that holds the state tree.
436
+ *
437
+ * **We recommend using `configureStore` from the
438
+ * `@reduxjs/toolkit` package**, which replaces `createStore`:
439
+ * **https://redux.js.org/introduction/why-rtk-is-redux-today**
440
+ *
376
441
  * The only way to change the data in the store is to call `dispatch()` on it.
377
442
  *
378
443
  * There should only be a single store in your app. To specify how different
379
- * parts of the state tree respond to actions, you may combine several
380
- * reducers
444
+ * parts of the state tree respond to actions, you may combine several reducers
381
445
  * into a single reducer function by using `combineReducers`.
382
446
  *
383
- * @template S State object type.
447
+ * @param {Function} reducer A function that returns the next state tree, given
448
+ * the current state tree and the action to handle.
384
449
  *
385
- * @param reducer A function that returns the next state tree, given the
386
- * current state tree and the action to handle.
450
+ * @param {any} [preloadedState] The initial state. You may optionally specify it
451
+ * to hydrate the state from the server in universal apps, or to restore a
452
+ * previously serialized user session.
453
+ * If you use `combineReducers` to produce the root reducer function, this must be
454
+ * an object with the same shape as `combineReducers` keys.
387
455
  *
388
- * @param [preloadedState] The initial state. You may optionally specify it to
389
- * hydrate the state from the server in universal apps, or to restore a
390
- * previously serialized user session. If you use `combineReducers` to
391
- * produce the root reducer function, this must be an object with the same
392
- * shape as `combineReducers` keys.
456
+ * @param {Function} [enhancer] The store enhancer. You may optionally specify it
457
+ * to enhance the store with third-party capabilities such as middleware,
458
+ * time travel, persistence, etc. The only store enhancer that ships with Redux
459
+ * is `applyMiddleware()`.
460
+ *
461
+ * @returns {Store} A Redux store that lets you read the state, dispatch actions
462
+ * and subscribe to changes.
463
+ */
464
+ export declare function legacy_createStore<S, A extends Action, Ext, StateExt>(
465
+ reducer: Reducer<S, A>,
466
+ enhancer?: StoreEnhancer<Ext, StateExt>
467
+ ): Store<S & StateExt, A> & Ext
468
+ /**
469
+ * Creates a Redux store that holds the state tree.
393
470
  *
394
- * @param [enhancer] The store enhancer. You may optionally specify it to
395
- * enhance the store with third-party capabilities such as middleware, time
396
- * travel, persistence, etc. The only store enhancer that ships with Redux
397
- * is `applyMiddleware()`.
471
+ * **We recommend using `configureStore` from the
472
+ * `@reduxjs/toolkit` package**, which replaces `createStore`:
473
+ * **https://redux.js.org/introduction/why-rtk-is-redux-today**
398
474
  *
399
- * @returns A Redux store that lets you read the state, dispatch actions and
400
- * subscribe to changes.
475
+ * The only way to change the data in the store is to call `dispatch()` on it.
476
+ *
477
+ * There should only be a single store in your app. To specify how different
478
+ * parts of the state tree respond to actions, you may combine several reducers
479
+ * into a single reducer function by using `combineReducers`.
480
+ *
481
+ * @param {Function} reducer A function that returns the next state tree, given
482
+ * the current state tree and the action to handle.
483
+ *
484
+ * @param {any} [preloadedState] The initial state. You may optionally specify it
485
+ * to hydrate the state from the server in universal apps, or to restore a
486
+ * previously serialized user session.
487
+ * If you use `combineReducers` to produce the root reducer function, this must be
488
+ * an object with the same shape as `combineReducers` keys.
489
+ *
490
+ * @param {Function} [enhancer] The store enhancer. You may optionally specify it
491
+ * to enhance the store with third-party capabilities such as middleware,
492
+ * time travel, persistence, etc. The only store enhancer that ships with Redux
493
+ * is `applyMiddleware()`.
494
+ *
495
+ * @returns {Store} A Redux store that lets you read the state, dispatch actions
496
+ * and subscribe to changes.
401
497
  */
402
- export const createStore: StoreCreator
498
+ export declare function legacy_createStore<S, A extends Action, Ext, StateExt>(
499
+ reducer: Reducer<S, A>,
500
+ preloadedState?: PreloadedState<S>,
501
+ enhancer?: StoreEnhancer<Ext>
502
+ ): Store<S & StateExt, A> & Ext
403
503
 
404
504
  /**
405
505
  * A store enhancer is a higher-order function that composes a store creator
@@ -117,29 +117,29 @@ function kindOf(val) {
117
117
  }
118
118
 
119
119
  /**
120
- * Creates a Redux store that holds the state tree.
121
- * The only way to change the data in the store is to call `dispatch()` on it.
120
+ * @deprecated
122
121
  *
123
- * There should only be a single store in your app. To specify how different
124
- * parts of the state tree respond to actions, you may combine several reducers
125
- * into a single reducer function by using `combineReducers`.
122
+ * **We recommend using the `configureStore` method
123
+ * of the `@reduxjs/toolkit` package**, which replaces `createStore`.
126
124
  *
127
- * @param {Function} reducer A function that returns the next state tree, given
128
- * the current state tree and the action to handle.
125
+ * Redux Toolkit is our recommended approach for writing Redux logic today,
126
+ * including store setup, reducers, data fetching, and more.
129
127
  *
130
- * @param {any} [preloadedState] The initial state. You may optionally specify it
131
- * to hydrate the state from the server in universal apps, or to restore a
132
- * previously serialized user session.
133
- * If you use `combineReducers` to produce the root reducer function, this must be
134
- * an object with the same shape as `combineReducers` keys.
128
+ * **For more details, please read this Redux docs page:**
129
+ * **https://redux.js.org/introduction/why-rtk-is-redux-today**
135
130
  *
136
- * @param {Function} [enhancer] The store enhancer. You may optionally specify it
137
- * to enhance the store with third-party capabilities such as middleware,
138
- * time travel, persistence, etc. The only store enhancer that ships with Redux
139
- * is `applyMiddleware()`.
131
+ * `configureStore` from Redux Toolkit is an improved version of `createStore` that
132
+ * simplifies setup and helps avoid common bugs.
133
+ *
134
+ * You should not be using the `redux` core package by itself today, except for learning purposes.
135
+ * The `createStore` method from the core `redux` package will not be removed, but we encourage
136
+ * all users to migrate to using Redux Toolkit for all Redux code.
137
+ *
138
+ * If you want to use `createStore` without this visual deprecation warning, use
139
+ * the `legacy_createStore` import instead:
140
+ *
141
+ * `import { legacy_createStore as createStore} from 'redux'`
140
142
  *
141
- * @returns {Store} A Redux store that lets you read the state, dispatch actions
142
- * and subscribe to changes.
143
143
  */
144
144
 
145
145
  function createStore(reducer, preloadedState, enhancer) {
@@ -389,6 +389,38 @@ function createStore(reducer, preloadedState, enhancer) {
389
389
  replaceReducer: replaceReducer
390
390
  }, _ref2[$$observable] = observable, _ref2;
391
391
  }
392
+ /**
393
+ * Creates a Redux store that holds the state tree.
394
+ *
395
+ * **We recommend using `configureStore` from the
396
+ * `@reduxjs/toolkit` package**, which replaces `createStore`:
397
+ * **https://redux.js.org/introduction/why-rtk-is-redux-today**
398
+ *
399
+ * The only way to change the data in the store is to call `dispatch()` on it.
400
+ *
401
+ * There should only be a single store in your app. To specify how different
402
+ * parts of the state tree respond to actions, you may combine several reducers
403
+ * into a single reducer function by using `combineReducers`.
404
+ *
405
+ * @param {Function} reducer A function that returns the next state tree, given
406
+ * the current state tree and the action to handle.
407
+ *
408
+ * @param {any} [preloadedState] The initial state. You may optionally specify it
409
+ * to hydrate the state from the server in universal apps, or to restore a
410
+ * previously serialized user session.
411
+ * If you use `combineReducers` to produce the root reducer function, this must be
412
+ * an object with the same shape as `combineReducers` keys.
413
+ *
414
+ * @param {Function} [enhancer] The store enhancer. You may optionally specify it
415
+ * to enhance the store with third-party capabilities such as middleware,
416
+ * time travel, persistence, etc. The only store enhancer that ships with Redux
417
+ * is `applyMiddleware()`.
418
+ *
419
+ * @returns {Store} A Redux store that lets you read the state, dispatch actions
420
+ * and subscribe to changes.
421
+ */
422
+
423
+ var legacy_createStore = createStore;
392
424
 
393
425
  /**
394
426
  * Prints a warning in the console if it exists.
@@ -695,3 +727,4 @@ exports.bindActionCreators = bindActionCreators;
695
727
  exports.combineReducers = combineReducers;
696
728
  exports.compose = compose;
697
729
  exports.createStore = createStore;
730
+ exports.legacy_createStore = legacy_createStore;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "redux",
3
- "version": "4.1.2",
3
+ "version": "4.2.0",
4
4
  "description": "Predictable state container for JavaScript apps",
5
5
  "license": "MIT",
6
6
  "homepage": "http://redux.js.org",
@@ -5,31 +5,31 @@ import isPlainObject from './utils/isPlainObject'
5
5
  import { kindOf } from './utils/kindOf'
6
6
 
7
7
  /**
8
- * Creates a Redux store that holds the state tree.
9
- * The only way to change the data in the store is to call `dispatch()` on it.
8
+ * @deprecated
10
9
  *
11
- * There should only be a single store in your app. To specify how different
12
- * parts of the state tree respond to actions, you may combine several reducers
13
- * into a single reducer function by using `combineReducers`.
10
+ * **We recommend using the `configureStore` method
11
+ * of the `@reduxjs/toolkit` package**, which replaces `createStore`.
14
12
  *
15
- * @param {Function} reducer A function that returns the next state tree, given
16
- * the current state tree and the action to handle.
13
+ * Redux Toolkit is our recommended approach for writing Redux logic today,
14
+ * including store setup, reducers, data fetching, and more.
17
15
  *
18
- * @param {any} [preloadedState] The initial state. You may optionally specify it
19
- * to hydrate the state from the server in universal apps, or to restore a
20
- * previously serialized user session.
21
- * If you use `combineReducers` to produce the root reducer function, this must be
22
- * an object with the same shape as `combineReducers` keys.
16
+ * **For more details, please read this Redux docs page:**
17
+ * **https://redux.js.org/introduction/why-rtk-is-redux-today**
23
18
  *
24
- * @param {Function} [enhancer] The store enhancer. You may optionally specify it
25
- * to enhance the store with third-party capabilities such as middleware,
26
- * time travel, persistence, etc. The only store enhancer that ships with Redux
27
- * is `applyMiddleware()`.
19
+ * `configureStore` from Redux Toolkit is an improved version of `createStore` that
20
+ * simplifies setup and helps avoid common bugs.
21
+ *
22
+ * You should not be using the `redux` core package by itself today, except for learning purposes.
23
+ * The `createStore` method from the core `redux` package will not be removed, but we encourage
24
+ * all users to migrate to using Redux Toolkit for all Redux code.
25
+ *
26
+ * If you want to use `createStore` without this visual deprecation warning, use
27
+ * the `legacy_createStore` import instead:
28
+ *
29
+ * `import { legacy_createStore as createStore} from 'redux'`
28
30
  *
29
- * @returns {Store} A Redux store that lets you read the state, dispatch actions
30
- * and subscribe to changes.
31
31
  */
32
- export default function createStore(reducer, preloadedState, enhancer) {
32
+ export function createStore(reducer, preloadedState, enhancer) {
33
33
  if (
34
34
  (typeof preloadedState === 'function' && typeof enhancer === 'function') ||
35
35
  (typeof enhancer === 'function' && typeof arguments[3] === 'function')
@@ -313,3 +313,35 @@ export default function createStore(reducer, preloadedState, enhancer) {
313
313
  [$$observable]: observable,
314
314
  }
315
315
  }
316
+
317
+ /**
318
+ * Creates a Redux store that holds the state tree.
319
+ *
320
+ * **We recommend using `configureStore` from the
321
+ * `@reduxjs/toolkit` package**, which replaces `createStore`:
322
+ * **https://redux.js.org/introduction/why-rtk-is-redux-today**
323
+ *
324
+ * The only way to change the data in the store is to call `dispatch()` on it.
325
+ *
326
+ * There should only be a single store in your app. To specify how different
327
+ * parts of the state tree respond to actions, you may combine several reducers
328
+ * into a single reducer function by using `combineReducers`.
329
+ *
330
+ * @param {Function} reducer A function that returns the next state tree, given
331
+ * the current state tree and the action to handle.
332
+ *
333
+ * @param {any} [preloadedState] The initial state. You may optionally specify it
334
+ * to hydrate the state from the server in universal apps, or to restore a
335
+ * previously serialized user session.
336
+ * If you use `combineReducers` to produce the root reducer function, this must be
337
+ * an object with the same shape as `combineReducers` keys.
338
+ *
339
+ * @param {Function} [enhancer] The store enhancer. You may optionally specify it
340
+ * to enhance the store with third-party capabilities such as middleware,
341
+ * time travel, persistence, etc. The only store enhancer that ships with Redux
342
+ * is `applyMiddleware()`.
343
+ *
344
+ * @returns {Store} A Redux store that lets you read the state, dispatch actions
345
+ * and subscribe to changes.
346
+ */
347
+ export const legacy_createStore = createStore
@@ -1,4 +1,4 @@
1
- import createStore from './createStore'
1
+ import { createStore, legacy_createStore } from './createStore'
2
2
  import combineReducers from './combineReducers'
3
3
  import bindActionCreators from './bindActionCreators'
4
4
  import applyMiddleware from './applyMiddleware'
@@ -28,6 +28,7 @@ if (
28
28
 
29
29
  export {
30
30
  createStore,
31
+ legacy_createStore,
31
32
  combineReducers,
32
33
  bindActionCreators,
33
34
  applyMiddleware,
data/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isomorfeus-redux",
3
3
  "dependencies": {
4
- "redux": "4.1.2"
4
+ "redux": "4.2.0"
5
5
  }
6
6
  }
metadata CHANGED
@@ -1,57 +1,77 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: isomorfeus-redux
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.1.18
4
+ version: 4.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jan Biedermann
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-02-19 00:00:00.000000000 Z
11
+ date: 2022-04-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: opal
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 1.4.1
19
+ version: 1.4.0
20
+ - - "<"
21
+ - !ruby/object:Gem::Version
22
+ version: 1.6.0
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
24
- - - "~>"
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ version: 1.4.0
30
+ - - "<"
25
31
  - !ruby/object:Gem::Version
26
- version: 1.4.1
32
+ version: 1.6.0
27
33
  - !ruby/object:Gem::Dependency
28
34
  name: isomorfeus-asset-manager
29
35
  requirement: !ruby/object:Gem::Requirement
30
36
  requirements:
31
37
  - - "~>"
32
38
  - !ruby/object:Gem::Version
33
- version: 0.14.12
39
+ version: 0.14.22
34
40
  type: :runtime
35
41
  prerelease: false
36
42
  version_requirements: !ruby/object:Gem::Requirement
37
43
  requirements:
38
44
  - - "~>"
39
45
  - !ruby/object:Gem::Version
40
- version: 0.14.12
46
+ version: 0.14.22
41
47
  - !ruby/object:Gem::Dependency
42
48
  name: isomorfeus-speednode
43
49
  requirement: !ruby/object:Gem::Requirement
44
50
  requirements:
45
51
  - - "~>"
46
52
  - !ruby/object:Gem::Version
47
- version: 0.5.0
53
+ version: 0.5.3
48
54
  type: :runtime
49
55
  prerelease: false
50
56
  version_requirements: !ruby/object:Gem::Requirement
51
57
  requirements:
52
58
  - - "~>"
53
59
  - !ruby/object:Gem::Version
54
- version: 0.5.0
60
+ version: 0.5.3
61
+ - !ruby/object:Gem::Dependency
62
+ name: isomorfeus-puppetmaster
63
+ requirement: !ruby/object:Gem::Requirement
64
+ requirements:
65
+ - - "~>"
66
+ - !ruby/object:Gem::Version
67
+ version: 0.6.7
68
+ type: :development
69
+ prerelease: false
70
+ version_requirements: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - "~>"
73
+ - !ruby/object:Gem::Version
74
+ version: 0.6.7
55
75
  - !ruby/object:Gem::Dependency
56
76
  name: rake
57
77
  requirement: !ruby/object:Gem::Requirement
@@ -66,6 +86,20 @@ dependencies:
66
86
  - - ">="
67
87
  - !ruby/object:Gem::Version
68
88
  version: '0'
89
+ - !ruby/object:Gem::Dependency
90
+ name: rspec
91
+ requirement: !ruby/object:Gem::Requirement
92
+ requirements:
93
+ - - "~>"
94
+ - !ruby/object:Gem::Version
95
+ version: '3.11'
96
+ type: :development
97
+ prerelease: false
98
+ version_requirements: !ruby/object:Gem::Requirement
99
+ requirements:
100
+ - - "~>"
101
+ - !ruby/object:Gem::Version
102
+ version: '3.11'
69
103
  description: Use different stores within Isomorfeus and write reducers for redux.
70
104
  email:
71
105
  - jan@kursator.com
@@ -276,7 +310,6 @@ files:
276
310
  - node_modules/@babel/runtime/helpers/writeOnlyError.js
277
311
  - node_modules/@babel/runtime/package.json
278
312
  - node_modules/@babel/runtime/regenerator/index.js
279
- - node_modules/redux/CHANGELOG.md
280
313
  - node_modules/redux/LICENSE.md
281
314
  - node_modules/redux/README.md
282
315
  - node_modules/redux/dist/redux.js
@@ -325,7 +358,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
325
358
  - !ruby/object:Gem::Version
326
359
  version: '0'
327
360
  requirements: []
328
- rubygems_version: 3.3.3
361
+ rubygems_version: 3.3.7
329
362
  signing_key:
330
363
  specification_version: 4
331
364
  summary: Redux and Stores for Isomorfeus.
@@ -1,4 +0,0 @@
1
- # Change Log
2
-
3
- This project adheres to [Semantic Versioning](http://semver.org/).
4
- Every release, along with the migration instructions, is documented on the Github [Releases](https://github.com/reduxjs/redux/releases) page.