-
-
Notifications
You must be signed in to change notification settings - Fork 2
callbackable actions
Ruben Arushanyan edited this page Apr 10, 2021
·
1 revision
callbackable-actions
is a standardized action format, which has callback capability.
-
action
<Object> an object which has the following required fields-
type
<String> a string, presents the type of action -
args
<Array> any array that contains all the data needed for the action (can be empty) -
cb
<Function> a callback function. By default, it is the identity function (f(x) => x) -
_index
<Integer> It creates automatically and shows action order by index. can be used as a unique identifier or help understand which action created earlier(in rare cases, it may be necessary)
-
In JavaScript, you can create callbackable-actions
standardized actions using this awesome package: Actions Creator