createAction
function createAction<Payload>(type: string): (payload: Payload) => Action<Payload>
Returns a function that generates a Redux action of the form { type, payload }.
This is particularly useful for code-splitting or for firing actions to non-Objective Redux reducers.
Template Parameters
Parameters
Returns
Examples
// To fire an action to a reducer not managed by Objective Redux
const action = createAction('myAction');
// To fire an action to an Objective Redux controller without using the controller
const action = createAction(getActionNameForController('myControllerName', 'myActionName'));