createAction - rootstrap/redux-tools GitHub Wiki
An action creator function.
Arguments
- actionType: (string): A string that will be used for the type of the created actions.
Returns
A function that receives a payload and returns an action.
Example:
const login = createAction('LOGIN')
dispatch(login({user: 'user', password: 'password'}))
// This would dispatch the next object:
{
type: 'LOGIN',
payload: {
user: 'user',
password: 'password',
},
}