April 2017
Intermediate to advanced
414 pages
8h 14m
English
Let's create some actions that will help us with our application. In the Tasks app, we had functionality for the following actions:
Here's an example of how an action for editing a task's name can look:
export function editTaskName (title, index) {
return {
type: 'EDIT_TASK_NAME',
title: title,
index: index
}
};
When naming an action, we want to correlate the type of action with exactly what has happened as a result of a user interaction. In this case, the user edited the task name. ...
Read now
Unlock full access