effect
effect(
effect
):object
Defined in: behavior.types.action.ts:85
Parameters
Section titled “Parameters”effect
Section titled “effect”(payload
) => void
Returns
Section titled “Returns”object
effect()
Section titled “effect()”effect: (
payload
) =>void
Parameters
Section titled “Parameters”payload
Section titled “payload”(event
) => void
Send a Behavior Event back into the Editor.
Example
defineBehavior({ on: '...', actions: [ () => [ effect(({send}) => { doSomethingAsync() .then(() => { send({ type: '...', }) }) }) ], ],})
Returns
Section titled “Returns”void
type:
"effect"