December 2019
Intermediate to advanced
598 pages
12h 21m
English
The whole state of the application lives inside what is called a store. The state is stored in a JavaScript object like the following one:
{ questions: { loading: false, unanswered: [{ questionId: 1, title: ... }, { questionId: 2, title: ... }] }}
In this example, the single object contains an array of unanswered questions, along with whether the questions are being fetched from a web API.
The state won't contain any functions or setters or any getters. It's a simple JavaScript object. The store also orchestrates all the moving parts in Redux. This includes pushing actions through reducers to update the state.
So, the first thing that needs to happen in order to update the state in a store is to dispatch an action. An action ...
Read now
Unlock full access