October 2019
Intermediate to advanced
426 pages
11h 49m
English
The first step when creating a full Redux application is to define so-called action types. They will be used to create actions in action creators and to handle actions in reducers. The idea here is to avoid making typos when defining, or comparing, the type property of actions.
Let's define the action types now:
export const FETCH_TODOS = 'FETCH_TODOS'export const ADD_TODO = 'ADD_TODO'export const TOGGLE_TODO = 'TOGGLE_TODO'export const REMOVE_TODO = 'REMOVE_TODO'export const FILTER_TODOS = 'FILTER_TODOS'
Now that we have defined our action types, we can start using them in action creators and reducers.
Read now
Unlock full access