February 2019
Intermediate to advanced
204 pages
4h 52m
English
We can define action types of register inside app/containers/Register/actions.js, as follows:
import { REGISTER_REQUEST, REGISTER_SUCCESS, REGISTER_FAILURE,} from './constants';export const onRegisterRequest = user => ({ type: REGISTER_REQUEST, user });export const onRegisterSuccess = user => ({ type: REGISTER_SUCCESS, user });export const onRegisterFailure = message => ({ type: REGISTER_FAILURE, message,});
We define all the required constants in the constants.js file, as follows:
export const REGISTER_REQUEST = 'raskLeage/Register/REGISTER_REQUEST';export const REGISTER_SUCCESS = 'raskLeage/Register/REGISTER_SUCCESS';export const REGISTER_FAILURE = 'raskLeage/Register/REGISTER_FAILURE';
So far, there is nothing new that we've ...
Read now
Unlock full access