Cloud API Overview > @adpt/cloud > action > Action > shouldAct
action.Action.shouldAct() method
Calculates whether or not any action is needed based on state/props/observation
Signature:
shouldAct(_op: ChangeType, _ctx: ActionContext): ShouldAct | Promise<ShouldAct>;
Parameters
Parameter | Type | Description |
---|---|---|
_op | ChangeType | |
_ctx | ActionContext |
Returns:
ShouldAct | Promise<ShouldAct>
false if no action needed, { act: true, detail: <user-facing description of action> }
.