|
|
|
@ -3134,11 +3134,22 @@ The only part of the state which is persisted is the token of the logged in user
|
|
|
|
|
is kept in cookies and in the local storage. Keeping the token in the cookies is necessary
|
|
|
|
|
for server-side rendering.
|
|
|
|
|
|
|
|
|
|
#### Redux Middleware
|
|
|
|
|
#### Redux
|
|
|
|
|
|
|
|
|
|
The in-memory state is handled by the *redux* library. This library is storngly insipred
|
|
|
|
|
by the [Flux](https://facebook.github.io/flux/) architecture but it has some specifics.
|
|
|
|
|
The whole state is in a single serializable tree structure called the *store*. This store
|
|
|
|
|
can be modified only by dispatching *actions* which are Plain Old JavaScript Oblects (POJO)
|
|
|
|
|
which are processed by *reducers*. A reducer is a pure function which takes the state
|
|
|
|
|
object and the action object and it creates a new state. This process is very easy to
|
|
|
|
|
reason about and is also very easy to test using unit tests. Please read the
|
|
|
|
|
[redux documentation](http://redux.js.org/) for detailed information about the library.
|
|
|
|
|
|
|
|
|
|
##### Redux Middleware
|
|
|
|
|
|
|
|
|
|
@todo
|
|
|
|
|
|
|
|
|
|
#### Accessing The Store Using Selectors
|
|
|
|
|
##### Accessing The Store Using Selectors
|
|
|
|
|
|
|
|
|
|
@todo
|
|
|
|
|
|
|
|
|
|