vn-verdnaturachat/app/actions/actionsTypes.js

18 lines
436 B
JavaScript
Raw Normal View History

2017-08-16 23:29:12 +00:00
const REQUEST = 'REQUEST';
const SUCCESS = 'SUCCESS';
const FAILURE = 'FAILURE';
function createRequestTypes(base) {
const res = {};
[REQUEST, SUCCESS, FAILURE].forEach(type => res[type] = `${ base }_${ type }`);
return res;
}
// Login events
export const LOGIN = createRequestTypes('LOGIN');
export const LOGOUT = 'LOGOUT'; // logout is always success
export const INCREMENT = 'INCREMENT';
export const DECREMENT = 'DECREMENT';