August 2017
Beginner
374 pages
10h 41m
English
In the first chapter, we learned how important actions are in Redux. Only actions can change the state of your application.
Redux actions are simple JavaScript objects with a type property, which specifies the name of the action.
Let's define a simple action, in the src/index.js file:
const createPost = { type: 'CREATE_POST', user: 'dan', text: 'New post' }console.log(createPost)
Now, save the file. Webpack should automatically refresh the page after modifying and saving a source file (such ...
Read now
Unlock full access