Skip to content

Actions

Allows to register actions that can be reused throughout your code.

Registers the action

actions.register('action-to-register', () => {})

Type:

type action = string

The name of the action you want to register.

Type:

type callback = (value) => {}

The callback to be executed on this action. The arguments for the callback are provided from the execute method.

Executes an action

Type:

type action = string

The name of the action you want to execute.

Type:

type value = any

Provides a value to the callback.

Removes the action.

Type:

type action = string

The name of the action you want to remove.