Skip to main content

EventOccurrence

interface

One delivery of an event to your listener. Dispatch through `occurrence.action(...)` rather than `ctx.action(...)` when you react to an event. The host then records the new action as caused by this delivery, so the causal trace shows the chain instead of two unrelated roots.

interface EventOccurrence<TValue>

Import

import { EventOccurrence } from '@modular/sdk/view';

Members3

value
TValue

The event payload.

action()
<K extends HostActionReference>(id: K, input: HostActionInput<K>, options?: HostActionClientRunOptions) => Promise<HostActionResult<K>>

Dispatch an action attributed to this delivery.

set()
<TState>(declaration: StateDeclaration<TState>, value: TState, options?: StateSetOptions) => Promise<void>