August 2017
Beginner
298 pages
7h 4m
English
We always define the initial state in our React components in the constructor, where we create the state variables. Similarly, we will need to create an initial state for our Redux too. The only difference is that the Redux state will have to hold the state for the entire app.
Let's strategize how the initial state will look:
In your store directory, create a new file--initialState.js--and add the following code containing the initialState object:
const initialState = { posts: ...Read now
Unlock full access