August 2017
Beginner
374 pages
10h 41m
English
As an added bonus of using webpack and Babel, we can put the action types in a separate actionTypes.js file and export them by performing the following steps:
export const CREATE_POST = 'CREATE_POST'
import { CREATE_POST } from './actionTypes'
Putting your action types in a separate file makes it very easy to figure out which actions are possible in the application—just look at the actionTypes.js file! As we are importing constants, your editor/IDE will also help by autocompleting the constant names.
Read now
Unlock full access