August 2017
Beginner
298 pages
7h 4m
English
Now that we have got our initial state ready, let's define all the actions our Blog application can do. Actions in our blog are nothing but the network requests we make to retrieve data. Each network request will have four actions associated with it.
Consider the request where we get all the blog posts from the server. The actions associated with this network request will be as follows:
So, in your redux/actionTypes directory, create an actionTypes.js file that will hold a constant value for all the actions that will happen in our application. In the actionTypes.js file, add the following code:
const actions = { GET_POSTS_AJAX_CALL_START : 'GET_POSTS_AJAX_CALL_START', ...Read now
Unlock full access