Skip to content

effect

effect(effect): object

Defined in: behavior.types.action.ts:85

(payload) => void

object

effect: (payload) => void

(event) => void

Send a Behavior Event back into the Editor.

Example

defineBehavior({
on: '...',
actions: [
() => [
effect(({send}) => {
doSomethingAsync()
.then(() => {
send({
type: '...',
})
})
})
],
],
})

void

type: "effect"