isomorfeus-redux 4.2.0 → 22.9.0.rc2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (236) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +176 -0
  3. data/lib/app_state.rb +25 -0
  4. data/lib/isomorfeus/browser_store_api.rb +0 -16
  5. data/lib/isomorfeus/redux/config.rb +97 -14
  6. data/lib/isomorfeus/redux/handler.rb +35 -0
  7. data/lib/isomorfeus/redux/version.rb +5 -0
  8. data/lib/isomorfeus/redux_imports.rb +14 -0
  9. data/lib/{redux/reducers.rb → isomorfeus/redux_reducers.rb} +15 -13
  10. data/lib/isomorfeus-redux.rb +18 -30
  11. data/lib/local_store.rb +27 -30
  12. data/lib/redux/store.rb +156 -120
  13. data/lib/session_store.rb +28 -30
  14. metadata +24 -247
  15. data/lib/app_store.rb +0 -42
  16. data/lib/isomorfeus/core_ext/hash/deep_merge.rb +0 -34
  17. data/lib/isomorfeus/core_ext/kernel.rb +0 -30
  18. data/lib/isomorfeus/execution_environment.rb +0 -67
  19. data/lib/isomorfeus/redux/imports.rb +0 -17
  20. data/lib/redux/version.rb +0 -3
  21. data/lib/redux.rb +0 -118
  22. data/node_modules/.package-lock.json +0 -31
  23. data/node_modules/@babel/runtime/LICENSE +0 -22
  24. data/node_modules/@babel/runtime/README.md +0 -19
  25. data/node_modules/@babel/runtime/helpers/AsyncGenerator.js +0 -99
  26. data/node_modules/@babel/runtime/helpers/AwaitValue.js +0 -6
  27. data/node_modules/@babel/runtime/helpers/applyDecoratedDescriptor.js +0 -31
  28. data/node_modules/@babel/runtime/helpers/arrayLikeToArray.js +0 -12
  29. data/node_modules/@babel/runtime/helpers/arrayWithHoles.js +0 -6
  30. data/node_modules/@babel/runtime/helpers/arrayWithoutHoles.js +0 -8
  31. data/node_modules/@babel/runtime/helpers/assertThisInitialized.js +0 -10
  32. data/node_modules/@babel/runtime/helpers/asyncGeneratorDelegate.js +0 -57
  33. data/node_modules/@babel/runtime/helpers/asyncIterator.js +0 -16
  34. data/node_modules/@babel/runtime/helpers/asyncToGenerator.js +0 -38
  35. data/node_modules/@babel/runtime/helpers/awaitAsyncGenerator.js +0 -8
  36. data/node_modules/@babel/runtime/helpers/checkPrivateRedeclaration.js +0 -8
  37. data/node_modules/@babel/runtime/helpers/classApplyDescriptorDestructureSet.js +0 -23
  38. data/node_modules/@babel/runtime/helpers/classApplyDescriptorGet.js +0 -10
  39. data/node_modules/@babel/runtime/helpers/classApplyDescriptorSet.js +0 -14
  40. data/node_modules/@babel/runtime/helpers/classCallCheck.js +0 -8
  41. data/node_modules/@babel/runtime/helpers/classCheckPrivateStaticAccess.js +0 -8
  42. data/node_modules/@babel/runtime/helpers/classCheckPrivateStaticFieldDescriptor.js +0 -8
  43. data/node_modules/@babel/runtime/helpers/classExtractFieldDescriptor.js +0 -10
  44. data/node_modules/@babel/runtime/helpers/classNameTDZError.js +0 -6
  45. data/node_modules/@babel/runtime/helpers/classPrivateFieldDestructureSet.js +0 -11
  46. data/node_modules/@babel/runtime/helpers/classPrivateFieldGet.js +0 -11
  47. data/node_modules/@babel/runtime/helpers/classPrivateFieldInitSpec.js +0 -9
  48. data/node_modules/@babel/runtime/helpers/classPrivateFieldLooseBase.js +0 -10
  49. data/node_modules/@babel/runtime/helpers/classPrivateFieldLooseKey.js +0 -8
  50. data/node_modules/@babel/runtime/helpers/classPrivateFieldSet.js +0 -12
  51. data/node_modules/@babel/runtime/helpers/classPrivateMethodGet.js +0 -10
  52. data/node_modules/@babel/runtime/helpers/classPrivateMethodInitSpec.js +0 -9
  53. data/node_modules/@babel/runtime/helpers/classPrivateMethodSet.js +0 -6
  54. data/node_modules/@babel/runtime/helpers/classStaticPrivateFieldDestructureSet.js +0 -14
  55. data/node_modules/@babel/runtime/helpers/classStaticPrivateFieldSpecGet.js +0 -14
  56. data/node_modules/@babel/runtime/helpers/classStaticPrivateFieldSpecSet.js +0 -15
  57. data/node_modules/@babel/runtime/helpers/classStaticPrivateMethodGet.js +0 -9
  58. data/node_modules/@babel/runtime/helpers/classStaticPrivateMethodSet.js +0 -6
  59. data/node_modules/@babel/runtime/helpers/construct.js +0 -26
  60. data/node_modules/@babel/runtime/helpers/createClass.js +0 -18
  61. data/node_modules/@babel/runtime/helpers/createForOfIteratorHelper.js +0 -61
  62. data/node_modules/@babel/runtime/helpers/createForOfIteratorHelperLoose.js +0 -25
  63. data/node_modules/@babel/runtime/helpers/createSuper.js +0 -25
  64. data/node_modules/@babel/runtime/helpers/decorate.js +0 -401
  65. data/node_modules/@babel/runtime/helpers/defaults.js +0 -17
  66. data/node_modules/@babel/runtime/helpers/defineEnumerableProperties.js +0 -25
  67. data/node_modules/@babel/runtime/helpers/defineProperty.js +0 -17
  68. data/node_modules/@babel/runtime/helpers/esm/AsyncGenerator.js +0 -95
  69. data/node_modules/@babel/runtime/helpers/esm/AwaitValue.js +0 -3
  70. data/node_modules/@babel/runtime/helpers/esm/applyDecoratedDescriptor.js +0 -28
  71. data/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js +0 -9
  72. data/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js +0 -3
  73. data/node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js +0 -4
  74. data/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js +0 -7
  75. data/node_modules/@babel/runtime/helpers/esm/asyncGeneratorDelegate.js +0 -54
  76. data/node_modules/@babel/runtime/helpers/esm/asyncIterator.js +0 -13
  77. data/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js +0 -35
  78. data/node_modules/@babel/runtime/helpers/esm/awaitAsyncGenerator.js +0 -4
  79. data/node_modules/@babel/runtime/helpers/esm/checkPrivateRedeclaration.js +0 -5
  80. data/node_modules/@babel/runtime/helpers/esm/classApplyDescriptorDestructureSet.js +0 -20
  81. data/node_modules/@babel/runtime/helpers/esm/classApplyDescriptorGet.js +0 -7
  82. data/node_modules/@babel/runtime/helpers/esm/classApplyDescriptorSet.js +0 -11
  83. data/node_modules/@babel/runtime/helpers/esm/classCallCheck.js +0 -5
  84. data/node_modules/@babel/runtime/helpers/esm/classCheckPrivateStaticAccess.js +0 -5
  85. data/node_modules/@babel/runtime/helpers/esm/classCheckPrivateStaticFieldDescriptor.js +0 -5
  86. data/node_modules/@babel/runtime/helpers/esm/classExtractFieldDescriptor.js +0 -7
  87. data/node_modules/@babel/runtime/helpers/esm/classNameTDZError.js +0 -3
  88. data/node_modules/@babel/runtime/helpers/esm/classPrivateFieldDestructureSet.js +0 -6
  89. data/node_modules/@babel/runtime/helpers/esm/classPrivateFieldGet.js +0 -6
  90. data/node_modules/@babel/runtime/helpers/esm/classPrivateFieldInitSpec.js +0 -5
  91. data/node_modules/@babel/runtime/helpers/esm/classPrivateFieldLooseBase.js +0 -7
  92. data/node_modules/@babel/runtime/helpers/esm/classPrivateFieldLooseKey.js +0 -4
  93. data/node_modules/@babel/runtime/helpers/esm/classPrivateFieldSet.js +0 -7
  94. data/node_modules/@babel/runtime/helpers/esm/classPrivateMethodGet.js +0 -7
  95. data/node_modules/@babel/runtime/helpers/esm/classPrivateMethodInitSpec.js +0 -5
  96. data/node_modules/@babel/runtime/helpers/esm/classPrivateMethodSet.js +0 -3
  97. data/node_modules/@babel/runtime/helpers/esm/classStaticPrivateFieldDestructureSet.js +0 -8
  98. data/node_modules/@babel/runtime/helpers/esm/classStaticPrivateFieldSpecGet.js +0 -8
  99. data/node_modules/@babel/runtime/helpers/esm/classStaticPrivateFieldSpecSet.js +0 -9
  100. data/node_modules/@babel/runtime/helpers/esm/classStaticPrivateMethodGet.js +0 -5
  101. data/node_modules/@babel/runtime/helpers/esm/classStaticPrivateMethodSet.js +0 -3
  102. data/node_modules/@babel/runtime/helpers/esm/construct.js +0 -18
  103. data/node_modules/@babel/runtime/helpers/esm/createClass.js +0 -15
  104. data/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js +0 -57
  105. data/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelperLoose.js +0 -21
  106. data/node_modules/@babel/runtime/helpers/esm/createSuper.js +0 -19
  107. data/node_modules/@babel/runtime/helpers/esm/decorate.js +0 -396
  108. data/node_modules/@babel/runtime/helpers/esm/defaults.js +0 -14
  109. data/node_modules/@babel/runtime/helpers/esm/defineEnumerableProperties.js +0 -22
  110. data/node_modules/@babel/runtime/helpers/esm/defineProperty.js +0 -14
  111. data/node_modules/@babel/runtime/helpers/esm/extends.js +0 -17
  112. data/node_modules/@babel/runtime/helpers/esm/get.js +0 -20
  113. data/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js +0 -6
  114. data/node_modules/@babel/runtime/helpers/esm/inherits.js +0 -15
  115. data/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js +0 -6
  116. data/node_modules/@babel/runtime/helpers/esm/initializerDefineProperty.js +0 -9
  117. data/node_modules/@babel/runtime/helpers/esm/initializerWarningHelper.js +0 -3
  118. data/node_modules/@babel/runtime/helpers/esm/instanceof.js +0 -7
  119. data/node_modules/@babel/runtime/helpers/esm/interopRequireDefault.js +0 -5
  120. data/node_modules/@babel/runtime/helpers/esm/interopRequireWildcard.js +0 -51
  121. data/node_modules/@babel/runtime/helpers/esm/isNativeFunction.js +0 -3
  122. data/node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js +0 -12
  123. data/node_modules/@babel/runtime/helpers/esm/iterableToArray.js +0 -3
  124. data/node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js +0 -29
  125. data/node_modules/@babel/runtime/helpers/esm/iterableToArrayLimitLoose.js +0 -14
  126. data/node_modules/@babel/runtime/helpers/esm/jsx.js +0 -46
  127. data/node_modules/@babel/runtime/helpers/esm/maybeArrayLike.js +0 -9
  128. data/node_modules/@babel/runtime/helpers/esm/newArrowCheck.js +0 -5
  129. data/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js +0 -3
  130. data/node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js +0 -3
  131. data/node_modules/@babel/runtime/helpers/esm/objectDestructuringEmpty.js +0 -3
  132. data/node_modules/@babel/runtime/helpers/esm/objectSpread.js +0 -19
  133. data/node_modules/@babel/runtime/helpers/esm/objectSpread2.js +0 -39
  134. data/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js +0 -19
  135. data/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js +0 -14
  136. data/node_modules/@babel/runtime/helpers/esm/package.json +0 -3
  137. data/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js +0 -11
  138. data/node_modules/@babel/runtime/helpers/esm/readOnlyError.js +0 -3
  139. data/node_modules/@babel/runtime/helpers/esm/set.js +0 -51
  140. data/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js +0 -8
  141. data/node_modules/@babel/runtime/helpers/esm/skipFirstGeneratorNext.js +0 -7
  142. data/node_modules/@babel/runtime/helpers/esm/slicedToArray.js +0 -7
  143. data/node_modules/@babel/runtime/helpers/esm/slicedToArrayLoose.js +0 -7
  144. data/node_modules/@babel/runtime/helpers/esm/superPropBase.js +0 -9
  145. data/node_modules/@babel/runtime/helpers/esm/taggedTemplateLiteral.js +0 -11
  146. data/node_modules/@babel/runtime/helpers/esm/taggedTemplateLiteralLoose.js +0 -8
  147. data/node_modules/@babel/runtime/helpers/esm/tdz.js +0 -3
  148. data/node_modules/@babel/runtime/helpers/esm/temporalRef.js +0 -5
  149. data/node_modules/@babel/runtime/helpers/esm/temporalUndefined.js +0 -1
  150. data/node_modules/@babel/runtime/helpers/esm/toArray.js +0 -7
  151. data/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js +0 -7
  152. data/node_modules/@babel/runtime/helpers/esm/toPrimitive.js +0 -13
  153. data/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js +0 -6
  154. data/node_modules/@babel/runtime/helpers/esm/typeof.js +0 -15
  155. data/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js +0 -9
  156. data/node_modules/@babel/runtime/helpers/esm/wrapAsyncGenerator.js +0 -6
  157. data/node_modules/@babel/runtime/helpers/esm/wrapNativeSuper.js +0 -37
  158. data/node_modules/@babel/runtime/helpers/esm/wrapRegExp.js +0 -65
  159. data/node_modules/@babel/runtime/helpers/esm/writeOnlyError.js +0 -3
  160. data/node_modules/@babel/runtime/helpers/extends.js +0 -21
  161. data/node_modules/@babel/runtime/helpers/get.js +0 -27
  162. data/node_modules/@babel/runtime/helpers/getPrototypeOf.js +0 -10
  163. data/node_modules/@babel/runtime/helpers/inherits.js +0 -19
  164. data/node_modules/@babel/runtime/helpers/inheritsLoose.js +0 -10
  165. data/node_modules/@babel/runtime/helpers/initializerDefineProperty.js +0 -12
  166. data/node_modules/@babel/runtime/helpers/initializerWarningHelper.js +0 -6
  167. data/node_modules/@babel/runtime/helpers/instanceof.js +0 -10
  168. data/node_modules/@babel/runtime/helpers/interopRequireDefault.js +0 -8
  169. data/node_modules/@babel/runtime/helpers/interopRequireWildcard.js +0 -54
  170. data/node_modules/@babel/runtime/helpers/isNativeFunction.js +0 -6
  171. data/node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js +0 -15
  172. data/node_modules/@babel/runtime/helpers/iterableToArray.js +0 -6
  173. data/node_modules/@babel/runtime/helpers/iterableToArrayLimit.js +0 -32
  174. data/node_modules/@babel/runtime/helpers/iterableToArrayLimitLoose.js +0 -17
  175. data/node_modules/@babel/runtime/helpers/jsx.js +0 -50
  176. data/node_modules/@babel/runtime/helpers/maybeArrayLike.js +0 -13
  177. data/node_modules/@babel/runtime/helpers/newArrowCheck.js +0 -8
  178. data/node_modules/@babel/runtime/helpers/nonIterableRest.js +0 -6
  179. data/node_modules/@babel/runtime/helpers/nonIterableSpread.js +0 -6
  180. data/node_modules/@babel/runtime/helpers/objectDestructuringEmpty.js +0 -6
  181. data/node_modules/@babel/runtime/helpers/objectSpread.js +0 -23
  182. data/node_modules/@babel/runtime/helpers/objectSpread2.js +0 -42
  183. data/node_modules/@babel/runtime/helpers/objectWithoutProperties.js +0 -23
  184. data/node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js +0 -17
  185. data/node_modules/@babel/runtime/helpers/possibleConstructorReturn.js +0 -16
  186. data/node_modules/@babel/runtime/helpers/readOnlyError.js +0 -6
  187. data/node_modules/@babel/runtime/helpers/set.js +0 -55
  188. data/node_modules/@babel/runtime/helpers/setPrototypeOf.js +0 -12
  189. data/node_modules/@babel/runtime/helpers/skipFirstGeneratorNext.js +0 -10
  190. data/node_modules/@babel/runtime/helpers/slicedToArray.js +0 -14
  191. data/node_modules/@babel/runtime/helpers/slicedToArrayLoose.js +0 -14
  192. data/node_modules/@babel/runtime/helpers/superPropBase.js +0 -13
  193. data/node_modules/@babel/runtime/helpers/taggedTemplateLiteral.js +0 -14
  194. data/node_modules/@babel/runtime/helpers/taggedTemplateLiteralLoose.js +0 -11
  195. data/node_modules/@babel/runtime/helpers/tdz.js +0 -6
  196. data/node_modules/@babel/runtime/helpers/temporalRef.js +0 -10
  197. data/node_modules/@babel/runtime/helpers/temporalUndefined.js +0 -4
  198. data/node_modules/@babel/runtime/helpers/toArray.js +0 -14
  199. data/node_modules/@babel/runtime/helpers/toConsumableArray.js +0 -14
  200. data/node_modules/@babel/runtime/helpers/toPrimitive.js +0 -17
  201. data/node_modules/@babel/runtime/helpers/toPropertyKey.js +0 -11
  202. data/node_modules/@babel/runtime/helpers/typeof.js +0 -22
  203. data/node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js +0 -13
  204. data/node_modules/@babel/runtime/helpers/wrapAsyncGenerator.js +0 -10
  205. data/node_modules/@babel/runtime/helpers/wrapNativeSuper.js +0 -45
  206. data/node_modules/@babel/runtime/helpers/wrapRegExp.js +0 -72
  207. data/node_modules/@babel/runtime/helpers/writeOnlyError.js +0 -6
  208. data/node_modules/@babel/runtime/package.json +0 -848
  209. data/node_modules/@babel/runtime/regenerator/index.js +0 -1
  210. data/node_modules/redux/LICENSE.md +0 -21
  211. data/node_modules/redux/README.md +0 -322
  212. data/node_modules/redux/dist/redux.js +0 -768
  213. data/node_modules/redux/dist/redux.min.js +0 -1
  214. data/node_modules/redux/es/redux.js +0 -716
  215. data/node_modules/redux/es/redux.mjs +0 -1
  216. data/node_modules/redux/index.d.ts +0 -776
  217. data/node_modules/redux/lib/redux.js +0 -730
  218. data/node_modules/redux/package.json +0 -108
  219. data/node_modules/redux/src/applyMiddleware.js +0 -41
  220. data/node_modules/redux/src/bindActionCreators.js +0 -52
  221. data/node_modules/redux/src/combineReducers.js +0 -175
  222. data/node_modules/redux/src/compose.js +0 -22
  223. data/node_modules/redux/src/createStore.js +0 -347
  224. data/node_modules/redux/src/index.js +0 -37
  225. data/node_modules/redux/src/utils/actionTypes.js +0 -17
  226. data/node_modules/redux/src/utils/formatProdErrorMessage.js +0 -15
  227. data/node_modules/redux/src/utils/isPlainObject.js +0 -14
  228. data/node_modules/redux/src/utils/kindOf.js +0 -70
  229. data/node_modules/redux/src/utils/symbol-observable.js +0 -3
  230. data/node_modules/redux/src/utils/warning.js +0 -19
  231. data/node_modules/regenerator-runtime/LICENSE +0 -21
  232. data/node_modules/regenerator-runtime/README.md +0 -31
  233. data/node_modules/regenerator-runtime/package.json +0 -19
  234. data/node_modules/regenerator-runtime/path.js +0 -11
  235. data/node_modules/regenerator-runtime/runtime.js +0 -754
  236. data/package.json +0 -6
@@ -1 +0,0 @@
1
- module.exports = require("regenerator-runtime");
@@ -1,21 +0,0 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) 2015-present Dan Abramov
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
@@ -1,322 +0,0 @@
1
- # <a href='http://redux.js.org'><img src='https://camo.githubusercontent.com/f28b5bc7822f1b7bb28a96d8d09e7d79169248fc/687474703a2f2f692e696d6775722e636f6d2f4a65567164514d2e706e67' height='60' alt='Redux Logo' aria-label='redux.js.org' /></a>
2
-
3
- Redux is a predictable state container for JavaScript apps.
4
- (Not to be confused with a WordPress framework – [Redux Framework](https://reduxframework.com/).)
5
-
6
- It helps you write applications that behave consistently, run in different environments (client, server, and native), and are easy to test. On top of that, it provides a great developer experience, such as [live code editing combined with a time traveling debugger](https://github.com/reduxjs/redux-devtools).
7
-
8
- You can use Redux together with [React](https://reactjs.org), or with any other view library.
9
- It is tiny (2kB, including dependencies).
10
-
11
- > **Note**: We are currently planning a rewrite of the Redux docs. Please take some time to **[fill out this survey on what content is most important in a docs site](https://docs.google.com/forms/d/e/1FAIpQLSfzIkY3fXZ8PrQKScYMK0YoEgALfAK2qQ0mOj1_ibKv2qDTuQ/viewform)**. Thanks!
12
-
13
- [![build status](https://img.shields.io/travis/reduxjs/redux/master.svg?style=flat-square)](https://travis-ci.org/reduxjs/redux)
14
- [![npm version](https://img.shields.io/npm/v/redux.svg?style=flat-square)](https://www.npmjs.com/package/redux)
15
- [![npm downloads](https://img.shields.io/npm/dm/redux.svg?style=flat-square)](https://www.npmjs.com/package/redux)
16
- [![redux channel on discord](https://img.shields.io/badge/discord-%23redux%20%40%20reactiflux-61dafb.svg?style=flat-square)](https://discord.gg/0ZcbPKXt5bZ6au5t)
17
- [![Changelog #187](https://img.shields.io/badge/changelog-%23187-lightgrey.svg?style=flat-square)](https://changelog.com/187)
18
-
19
- ## Learn Redux
20
-
21
- We have a variety of resources available to help you learn Redux, no matter what your background or learning style is.
22
-
23
- ### Just the Basics
24
-
25
- If you're brand new to Redux and want to understand the basic concepts, see:
26
-
27
- - The **[Motivation](https://redux.js.org/introduction/motivation)** behind building Redux, the **[Core Concepts](https://redux.js.org/introduction/coreconcepts)**, and the **[Three Principles](https://redux.js.org/introduction/threeprinciples)**.
28
- - The **[basic tutorial in the Redux docs](https://redux.js.org/basics)**
29
- - Redux creator Dan Abramov's **free ["Getting Started with Redux" video series](https://egghead.io/series/getting-started-with-redux)** on Egghead.io
30
- - Redux co-maintainer Mark Erikson's **["Redux Fundamentals" slideshow](http://blog.isquaredsoftware.com/2018/03/presentation-reactathon-redux-fundamentals/)** and **[list of suggested resources for learning Redux](http://blog.isquaredsoftware.com/2017/12/blogged-answers-learn-redux/)**
31
- - If you learn best by looking at code and playing with it, check out our list of **[Redux example applications](https://redux.js.org/introduction/examples)**, available as separate projects in the Redux repo, and also as interactive online examples on CodeSandbox.
32
- - The **[Redux Tutorials](https://github.com/markerikson/react-redux-links/blob/master/redux-tutorials.md)** section of the **[React/Redux links list](https://github.com/markerikson/react-redux-links)**. Here's a top list of our recommended tutorials:
33
- - Dave Ceddia's posts [What Does Redux Do? (and when should you use it?)](https://daveceddia.com/what-does-redux-do/) and [How Redux Works: A Counter-Example](https://daveceddia.com/how-does-redux-work/) are a great intro to the basics of Redux and how to use it with React, as is this post on [React and Redux: An Introduction](http://jakesidsmith.com/blog/post/2017-11-18-redux-and-react-an-introduction/).
34
- - Valentino Gagliardi's post [React Redux Tutorial for Beginners: Learning Redux in 2018](https://www.valentinog.com/blog/react-redux-tutorial-beginners/) is an excellent extended introduction to many aspects of using Redux.
35
- - The CSS Tricks article [Leveling Up with React: Redux](https://css-tricks.com/learning-react-redux/) covers the Redux basics well.
36
- - This [DevGuides: Introduction to Redux](http://devguides.io/redux/) tutorial covers several aspects of Redux, including actions, reducers, usage with React, and middleware.
37
-
38
- ### Intermediate Concepts
39
-
40
- Once you've picked up the basics of working with actions, reducers, and the store, you may have questions about topics like working with asynchronous logic and AJAX requests, connecting a UI framework like React to your Redux store, and setting up an application to use Redux:
41
-
42
- - The **["Advanced" docs section](https://redux.js.org/advanced)** covers working with async logic, middleware, routing.
43
- - The Redux docs **["Learning Resources"](https://redux.js.org/introduction/learning-resources)** page points to recommended articles on a variety of Redux-related topics.
44
- - Sophie DeBenedetto's 8-part **[Building a Simple CRUD App with React + Redux](http://www.thegreatcodeadventure.com/building-a-simple-crud-app-with-react-redux-part-1/)** series shows how to put together a basic CRUD app from scratch.
45
-
46
- ### Real-World Usage
47
-
48
- Going from a TodoMVC app to a real production application can be a big jump, but we've got plenty of resources to help:
49
-
50
- - Redux creator Dan Abramov's **[free "Building React Applications with Idiomatic Redux" video series](https://egghead.io/courses/building-react-applications-with-idiomatic-redux)** builds on his first video series and covers topics like middleware, routing, and persistence.
51
- - The **[Redux FAQ](https://redux.js.org/faq)** answers many common questions about how to use Redux, and the **["Recipes" docs section](https://redux.js.org/recipes)** has information on handling derived data, testing, structuring reducer logic, and reducing boilerplate.
52
- - Redux co-maintainer Mark Erikson's **["Practical Redux" tutorial series](http://blog.isquaredsoftware.com/series/practical-redux/)** demonstrates real-world intermediate and advanced techniques for working with React and Redux (also available as **[an interactive course on Educative.io](https://www.educative.io/collection/5687753853370368/5707702298738688)**).
53
- - The **[React/Redux links list](https://github.com/markerikson/react-redux-links)** has categorized articles on working with [reducers and selectors](https://github.com/markerikson/react-redux-links/blob/master/redux-reducers-selectors.md), [managing side effects](https://github.com/markerikson/react-redux-links/blob/master/redux-side-effects.md), [Redux architecture and best practices](https://github.com/markerikson/react-redux-links/blob/master/redux-architecture.md), and more.
54
- - Our community has created thousands of Redux-related libraries, addons, and tools. The **["Ecosystem" docs page](https://redux.js.org/introduction/ecosystem)** lists our recommendations, and there's a complete listing available in the **[Redux addons catalog](https://github.com/markerikson/redux-ecosystem-links)**.
55
- - If you're looking to learn from actual application codebases, the addons catalog also has a list of **[purpose-built examples and real-world applications](https://github.com/markerikson/redux-ecosystem-links/blob/master/apps-and-examples.md)**.
56
-
57
- Finally, Mark Erikson is teaching a series of **[Redux workshops through Workshop.me](#redux-workshops)**. Check the [workshop schedule](https://workshop.me/?a=mark) for upcoming dates and locations.
58
-
59
- ### Help and Discussion
60
-
61
- The **[#redux channel](https://discord.gg/0ZcbPKXt5bZ6au5t)** of the **[Reactiflux Discord community](http://www.reactiflux.com)** is our official resource for all questions related to learning and using Redux. Reactiflux is a great place to hang out, ask questions, and learn - come join us!
62
-
63
- ## Before Proceeding Further
64
-
65
- Redux is a valuable tool for organizing your state, but you should also consider whether it's appropriate for your situation. Don't use Redux just because someone said you should - take some time to understand the potential benefits and tradeoffs of using it.
66
-
67
- Here are some suggestions on when it makes sense to use Redux:
68
-
69
- - You have reasonable amounts of data changing over time
70
- - You need a single source of truth for your state
71
- - You find that keeping all your state in a top-level component is no longer sufficient
72
-
73
- Yes, these guidelines are subjective and vague, but this is for good reason. The point at which you should integrate Redux into your application is different for every user and different for every application.
74
-
75
- > **For more thoughts on how Redux is meant to be used, see:**<br>
76
- >
77
- > - **[You Might Not Need Redux](https://medium.com/@dan_abramov/you-might-not-need-redux-be46360cf367)**<br>
78
- > - **[The Tao of Redux, Part 1 - Implementation and Intent](http://blog.isquaredsoftware.com/2017/05/idiomatic-redux-tao-of-redux-part-1/)**<br>
79
- > - **[The Tao of Redux, Part 2 - Practice and Philosophy](http://blog.isquaredsoftware.com/2017/05/idiomatic-redux-tao-of-redux-part-2/)**
80
- > - **[Redux FAQ](https://redux.js.org/faq)**
81
-
82
- ## Developer Experience
83
-
84
- Dan Abramov (author of Redux) wrote Redux while working on his React Europe talk called [“Hot Reloading with Time Travel”](https://www.youtube.com/watch?v=xsSnOQynTHs). His goal was to create a state management library with a minimal API but completely predictable behavior. Redux makes it possible to implement logging, hot reloading, time travel, universal apps, record and replay, without any buy-in from the developer.
85
-
86
- ## Influences
87
-
88
- Redux evolves the ideas of [Flux](http://facebook.github.io/flux/), but avoids its complexity by taking cues from [Elm](https://github.com/evancz/elm-architecture-tutorial/).
89
- Even if you haven't used Flux or Elm, Redux only takes a few minutes to get started with.
90
-
91
- ## Installation
92
-
93
- To install the stable version:
94
-
95
- ```sh
96
- npm install --save redux
97
- ```
98
-
99
- This assumes you are using [npm](https://www.npmjs.com/) as your package manager.
100
-
101
- If you're not, you can [access these files on unpkg](https://unpkg.com/redux/), download them, or point your package manager to them.
102
-
103
- Most commonly, people consume Redux as a collection of [CommonJS](https://github.com/webpack/docs/wiki/commonjs) modules. These modules are what you get when you import `redux` in a [Webpack](https://webpack.js.org/), [Browserify](http://browserify.org/), or a Node environment. If you like to live on the edge and use [Rollup](https://rollupjs.org), we support that as well.
104
-
105
- If you don't use a module bundler, it's also fine. The `redux` npm package includes precompiled production and development [UMD](https://github.com/umdjs/umd) builds in the [`dist` folder](https://unpkg.com/redux/dist/). They can be used directly without a bundler and are thus compatible with many popular JavaScript module loaders and environments. For example, you can drop a UMD build as a [`<script>` tag](https://unpkg.com/redux/dist/redux.js) on the page, or [tell Bower to install it](https://github.com/reduxjs/redux/pull/1181#issuecomment-167361975). The UMD builds make Redux available as a `window.Redux` global variable.
106
-
107
- The Redux source code is written in ES2015 but we precompile both CommonJS and UMD builds to ES5 so they work in [any modern browser](http://caniuse.com/#feat=es5). You don't need to use Babel or a module bundler to [get started with Redux](https://github.com/reduxjs/redux/blob/master/examples/counter-vanilla/index.html). You can even use the ES module build that's available at [`es/redux.mjs`](https://unpkg.com/redux/es/) which can be referenced using `type="module"` in your `script` tag or as a standard `import`.
108
-
109
- ### Complementary Packages
110
-
111
- Most likely, you'll also need [the React bindings](https://github.com/reduxjs/react-redux) and [the developer tools](https://github.com/reduxjs/redux-devtools).
112
-
113
- ```sh
114
- npm install --save react-redux
115
- npm install --save-dev redux-devtools
116
- ```
117
-
118
- Note that unlike Redux itself, many packages in the Redux ecosystem don't provide UMD builds, so we recommend using CommonJS module bundlers like [Webpack](https://webpack.js.org/) and [Browserify](http://browserify.org/) for the most comfortable development experience.
119
-
120
- ## The Gist
121
-
122
- The whole state of your app is stored in an object tree inside a single _store_.
123
- The only way to change the state tree is to emit an _action_, an object describing what happened.
124
- To specify how the actions transform the state tree, you write pure _reducers_.
125
-
126
- That's it!
127
-
128
- ```js
129
- import { createStore } from 'redux'
130
-
131
- /**
132
- * This is a reducer, a pure function with (state, action) => state signature.
133
- * It describes how an action transforms the state into the next state.
134
- *
135
- * The shape of the state is up to you: it can be a primitive, an array, an object,
136
- * or even an Immutable.js data structure. The only important part is that you should
137
- * not mutate the state object, but return a new object if the state changes.
138
- *
139
- * In this example, we use a `switch` statement and strings, but you can use a helper that
140
- * follows a different convention (such as function maps) if it makes sense for your
141
- * project.
142
- */
143
- function counter(state = 0, action) {
144
- switch (action.type) {
145
- case 'INCREMENT':
146
- return state + 1
147
- case 'DECREMENT':
148
- return state - 1
149
- default:
150
- return state
151
- }
152
- }
153
-
154
- // Create a Redux store holding the state of your app.
155
- // Its API is { subscribe, dispatch, getState }.
156
- let store = createStore(counter)
157
-
158
- // You can use subscribe() to update the UI in response to state changes.
159
- // Normally you'd use a view binding library (e.g. React Redux) rather than subscribe() directly.
160
- // However it can also be handy to persist the current state in the localStorage.
161
-
162
- store.subscribe(() => console.log(store.getState()))
163
-
164
- // The only way to mutate the internal state is to dispatch an action.
165
- // The actions can be serialized, logged or stored and later replayed.
166
- store.dispatch({ type: 'INCREMENT' })
167
- // 1
168
- store.dispatch({ type: 'INCREMENT' })
169
- // 2
170
- store.dispatch({ type: 'DECREMENT' })
171
- // 1
172
- ```
173
-
174
- Instead of mutating the state directly, you specify the mutations you want to happen with plain objects called _actions_. Then you write a special function called a _reducer_ to decide how every action transforms the entire application's state.
175
-
176
- If you're coming from Flux, there is a single important difference you need to understand. Redux doesn't have a Dispatcher or support many stores. Instead, there is just a single store with a single root reducing function. As your app grows, instead of adding stores, you split the root reducer into smaller reducers independently operating on the different parts of the state tree. This is exactly like how there is just one root component in a React app, but it is composed out of many small components.
177
-
178
- This architecture might seem like an overkill for a counter app, but the beauty of this pattern is how well it scales to large and complex apps. It also enables very powerful developer tools, because it is possible to trace every mutation to the action that caused it. You can record user sessions and reproduce them just by replaying every action.
179
-
180
- ## Learn Redux from Its Authors
181
-
182
- ### Redux Video Tutorials by Dan Abramov
183
-
184
- #### Getting Started with Redux
185
-
186
- **[Getting Started with Redux](https://egghead.io/series/getting-started-with-redux)** is a video course consisting of 30 videos narrated by [Dan Abramov](https://twitter.com/dan_abramov), author of Redux. It is designed to complement the “Basics” part of the docs while bringing additional insights about immutability, testing, Redux best practices, and using Redux with React. **This course is free and will always be.**
187
-
188
- > [“Great course on egghead.io by @dan_abramov - instead of just showing you how to use #redux, it also shows how and why redux was built!”](https://twitter.com/sandrinodm/status/670548531422326785)
189
- > Sandrino Di Mattia
190
-
191
- > [“Plowing through @dan_abramov 'Getting Started with Redux' - its amazing how much simpler concepts get with video.”](https://twitter.com/chrisdhanaraj/status/670328025553219584)
192
- > Chris Dhanaraj
193
-
194
- > [“This video series on Redux by @dan_abramov on @eggheadio is spectacular!”](https://twitter.com/eddiezane/status/670333133242408960)
195
- > Eddie Zaneski
196
-
197
- > [“Come for the name hype. Stay for the rock solid fundamentals. (Thanks, and great job @dan_abramov and @eggheadio!)”](https://twitter.com/danott/status/669909126554607617)
198
- > Dan
199
-
200
- > [“This series of videos on Redux by @dan_abramov is repeatedly blowing my mind - gunna do some serious refactoring”](https://twitter.com/gelatindesign/status/669658358643892224)
201
- > Laurence Roberts
202
-
203
- So, what are you waiting for?
204
-
205
- #### [Watch the free "Getting Started with Redux" video series](https://egghead.io/series/getting-started-with-redux)
206
-
207
- > Note: If you enjoyed Dan's course, consider supporting Egghead by [buying a subscription](https://egghead.io/pricing). Subscribers have access to the source code of every example in my videos and tons of advanced lessons on other topics, including JavaScript in depth, React, Angular, and more. Many [Egghead instructors](https://egghead.io/instructors) are also open source library authors, so buying a subscription is a nice way to thank them for the work that they've done.
208
-
209
- #### Building React Applications with Idiomatic Redux
210
-
211
- The **[Building React Applications with Idiomatic Redux](https://egghead.io/courses/building-react-applications-with-idiomatic-redux)** course is a second free video series by Dan Abramov. It picks up where the first series left off, and covers practical production ready techniques for building your React and Redux applications: advanced state management, middleware, React Router integration, and other common problems you are likely to encounter while building applications for your clients and customers. As with the first series, **this course will always be free**.
212
-
213
- #### [Watch the free "Idiomatic Redux" video series](https://egghead.io/courses/building-react-applications-with-idiomatic-redux)
214
-
215
- ### Practical Redux course
216
-
217
- **[Practical Redux](https://www.educative.io/collection/5687753853370368/5707702298738688/)** is a paid interactive course by Redux co-maintainer [Mark Erikson](https://twitter.com/acemarke). The course is designed to show how to apply the basic concepts of Redux to building something larger than a TodoMVC application. It includes real-world topics like:
218
-
219
- - Adding Redux to a new Create-React-App project and configuring Hot Module Replacement for faster development
220
- - Controlling your UI behavior with Redux
221
- - Using the Redux-ORM library to manage relational data in your Redux store
222
- - Building a master/detail view to display and edit data
223
- - Writing custom advanced Redux reducer logic to solve specific problems
224
- - Optimizing performance of Redux-connected form inputs
225
-
226
- And much more!
227
-
228
- The course is based on Mark's original free **["Practical Redux" blog tutorial series](http://blog.isquaredsoftware.com/series/practical-redux/)**, but with updated and improved content.
229
-
230
- ### Redux Fundamentals Workshop
231
-
232
- Redux co-maintainer [Mark Erikson](https://twitter.com/acemarke) has put together a [**Redux Fundamentals workshop**, and slides are available here](https://blog.isquaredsoftware.com/2018/06/redux-fundamentals-workshop-slides/). They cover:
233
-
234
- - The history and purpose of Redux
235
- - Reducers and actions, and working with a Redux store
236
- - Using Redux with React
237
- - Using and writing Redux middleware
238
- - Working with AJAX calls and other side effects
239
- - Unit testing Redux apps
240
- - Real-world Redux app structure and development
241
-
242
- ## Documentation
243
-
244
- - [Introduction](http://redux.js.org/introduction)
245
- - [Basics](http://redux.js.org/basics)
246
- - [Advanced](http://redux.js.org/advanced)
247
- - [Recipes](http://redux.js.org/recipes)
248
- - [FAQ](http://redux.js.org/faq)
249
- - [Troubleshooting](http://redux.js.org/troubleshooting)
250
- - [Glossary](http://redux.js.org/glossary)
251
- - [API Reference](http://redux.js.org/api)
252
-
253
- For PDF, ePub, and MOBI exports for offline reading, and instructions on how to create them, please see: [paulkogel/redux-offline-docs](https://github.com/paulkogel/redux-offline-docs).
254
-
255
- For Offline docs, please see: [devdocs](http://devdocs.io/redux/)
256
-
257
- ## Examples
258
-
259
- Almost all examples have a corresponding CodeSandbox sandbox. This is an interactive version of the code that you can play with online.
260
-
261
- - [**Counter Vanilla**](https://redux.js.org/introduction/examples#counter-vanilla): [Source](https://github.com/reduxjs/redux/tree/master/examples/counter-vanilla)
262
- - [**Counter**](https://redux.js.org/introduction/examples#counter): [Source](https://github.com/reduxjs/redux/tree/master/examples/counter) | [Sandbox](https://codesandbox.io/s/github/reduxjs/redux/tree/master/examples/counter)
263
- - [**Todos**](https://redux.js.org/introduction/examples#todos): [Source](https://github.com/reduxjs/redux/tree/master/examples/todos) | [Sandbox](https://codesandbox.io/s/github/reduxjs/redux/tree/master/examples/todos)
264
- - [**Todos with Undo**](https://redux.js.org/introduction/examples#todos-with-undo): [Source](https://github.com/reduxjs/redux/tree/master/examples/todos-with-undo) | [Sandbox](https://codesandbox.io/s/github/reduxjs/redux/tree/master/examples/todos-with-undo)
265
- - [**Todos w/ Flow**](https://redux.js.org/introduction/examples#todos-flow): [Source](https://github.com/reduxjs/redux/tree/master/examples/todos-flow)
266
- - [**TodoMVC**](https://redux.js.org/introduction/examples#todomvc): [Source](https://github.com/reduxjs/redux/tree/master/examples/todomvc) | [Sandbox](https://codesandbox.io/s/github/reduxjs/redux/tree/master/examples/todomvc)
267
- - [**Shopping Cart**](https://redux.js.org/introduction/examples#shopping-cart): [Source](https://github.com/reduxjs/redux/tree/master/examples/shopping-cart) | [Sandbox](https://codesandbox.io/s/github/reduxjs/redux/tree/master/examples/shopping-cart)
268
- - [**Tree View**](https://redux.js.org/introduction/examples#tree-view): [Source](https://github.com/reduxjs/redux/tree/master/examples/tree-view) | [Sandbox](https://codesandbox.io/s/github/reduxjs/redux/tree/master/examples/tree-view)
269
- - [**Async**](https://redux.js.org/introduction/examples#async): [Source](https://github.com/reduxjs/redux/tree/master/examples/async) | [Sandbox](https://codesandbox.io/s/github/reduxjs/redux/tree/master/examples/async)
270
- - [**Universal**](https://redux.js.org/introduction/examples#universal): [Source](https://github.com/reduxjs/redux/tree/master/examples/universal)
271
- - [**Real World**](https://redux.js.org/introduction/examples#real-world): [Source](https://github.com/reduxjs/redux/tree/master/examples/real-world) | [Sandbox](https://codesandbox.io/s/github/reduxjs/redux/tree/master/examples/real-world)
272
-
273
- If you're new to the NPM ecosystem and have troubles getting a project up and running, or aren't sure where to paste the gist above, check out [simplest-redux-example](https://github.com/jackielii/simplest-redux-example) that uses Redux together with React and Browserify.
274
-
275
- ## Testimonials
276
-
277
- > [“Love what you're doing with Redux”](https://twitter.com/jingc/status/616608251463909376)
278
- > Jing Chen, creator of Flux
279
-
280
- > [“I asked for comments on Redux in FB's internal JS discussion group, and it was universally praised. Really awesome work.”](https://twitter.com/fisherwebdev/status/616286955693682688)
281
- > Bill Fisher, author of Flux documentation
282
-
283
- > [“It's cool that you are inventing a better Flux by not doing Flux at all.”](https://twitter.com/andrestaltz/status/616271392930201604)
284
- > André Staltz, creator of Cycle
285
-
286
- ## Thanks
287
-
288
- - [The Elm Architecture](https://github.com/evancz/elm-architecture-tutorial) for a great intro to modeling state updates with reducers;
289
- - [Turning the database inside-out](https://www.confluent.io/blog/turning-the-database-inside-out-with-apache-samza/) for blowing my mind;
290
- - [Developing ClojureScript with Figwheel](https://www.youtube.com/watch?v=j-kj2qwJa_E) for convincing me that re-evaluation should “just work”;
291
- - [Webpack](https://webpack.js.org/concepts/hot-module-replacement/) for Hot Module Replacement;
292
- - [Flummox](https://github.com/acdlite/flummox) for teaching me to approach Flux without boilerplate or singletons;
293
- - [disto](https://github.com/threepointone/disto) for a proof of concept of hot reloadable Stores;
294
- - [NuclearJS](https://github.com/optimizely/nuclear-js) for proving this architecture can be performant;
295
- - [Om](https://github.com/omcljs/om) for popularizing the idea of a single state atom;
296
- - [Cycle](https://github.com/cyclejs/cycle-core) for showing how often a function is the best tool;
297
- - [React](https://github.com/facebook/react) for the pragmatic innovation.
298
-
299
- Special thanks to [Jamie Paton](http://jdpaton.github.io) for handing over the `redux` NPM package name.
300
-
301
- ## Logo
302
-
303
- You can find the official logo [on GitHub](https://github.com/reduxjs/redux/tree/master/logo).
304
-
305
- ## Change Log
306
-
307
- This project adheres to [Semantic Versioning](http://semver.org/).
308
- Every release, along with the migration instructions, is documented on the GitHub [Releases](https://github.com/reduxjs/redux/releases) page.
309
-
310
- ## Patrons
311
-
312
- The work on Redux was [funded by the community](https://www.patreon.com/reactdx).
313
- Meet some of the outstanding companies that made it possible:
314
-
315
- - [Webflow](https://github.com/webflow)
316
- - [Ximedes](https://www.ximedes.com/)
317
-
318
- [See the full list of Redux patrons](PATRONS.md), as well as the always-growing list of [people and companies that use Redux](https://github.com/reduxjs/redux/issues/310).
319
-
320
- ## License
321
-
322
- [MIT](LICENSE.md)