@cobuildlab/react-simple-state › "actions"
▸ createAction‹T, U, E, R›(event
: Event‹T, R›, errorEvent
: Event‹E, E›, action
: function): ActionType‹T, U, E, R›
Defined in src/actions.ts:10
Type parameters:
▪ T
▪ U: any[]
▪ E
▪ R
Parameters:
▪ event: Event‹T, R›
Event to bind the action.
▪ errorEvent: Event‹E, E›
Event to bind on error.
▪ action: function
Action to call.
▸ (...params
: keyof []): Promise‹CheckGeneric‹T, R››
Parameters:
Name | Type |
---|---|
...params |
keyof [] |
Returns: ActionType‹T, U, E, R›
- Function with the binded event.