Objective Redux

Redux made better, objectively.

getActionNameForController

function getActionNameForController(controllerName: string, actionName: string, namespace: string = ""): string

Gets an action name that can be used to fire a controller's action without using the controller.
This can be used along with [[createAction]] to create an action.

Parameters

controllerName: string
The name of the controller the action should target.

actionName: string
The name of the registered action the action should target.

namespace: string = ""
The namespace of the controller. Defaults to a non-namespaced controller.

Returns

string
The generated action name.

Examples

const action = createAction(getActionNameForController('myControllerName', 'myActionName'));