In redux, the action type is just a normal string type, it is easy to get naming conflicts in large application.
Can use namespace-constants lib to solve the problem: https://npmdaily.com/pkg/namespace-constants
import constants from 'namespace-constants'; module.exports = constants('todos', [
'ADD_TODO',
'REMOVE_TODO',
'TOGGLE_TODO'
]);
// {
// 'ADD_TODO': 'todos:ADD_TODO',
// 'REMOVE_TODO': 'todos:REMOVE_TODO'
// 'TOGGLE_TODO': 'todos:TOGGLE_TODO'
// }