August 2017
Beginner
298 pages
7h 4m
English
Actions are dispatched from the React components when they need to modify the state of the application. We need two actions for our application, one for the posts page and one for the authors page. However, as in the preceding chapter, I'll only focus on the posts page; you can work on the authors page once you are done with this chapter. The completed code files have the actions completed for the authors page too, so you can use it as your reference.
Let's get started. In the actions directory, create two files, authorActions.js and postActions.js. Your redux folder should look like this:
.├── actions│ ├── authorActions.js│ └── postActions.js├── actionTypes│ └── actionTypes.js├── reducers└── store └── initialState.js
Here, leave ...
Read now
Unlock full access