August 2017
Beginner
374 pages
10h 41m
English
As always, we start by defining action types and the action creator. The action creator will be used to create (and dispatch) the login request from the client:
// users// ...other user related action types...export const LOGIN_REQUEST = 'LOGIN_REQUEST'export const LOGIN_SUCCESS = 'LOGIN_SUCCESS'export const LOGIN_FAILURE = 'LOGIN_FAILURE'// ...other action types...
import { FETCH_USER_REQUEST, FETCH_USER_SUCCESS, FETCH_USER_FAILURE, CREATE_USER_REQUEST, CREATE_USER_SUCCESS, CREATE_USER_FAILURE, LOGIN_REQUEST, LOGIN_SUCCESS, LOGIN_FAILURE} from '../actionTypes'
Read now
Unlock full access