Interface CauslProviderProps<Msg>

Props for CauslProvider.

The explicit | undefined on update is required under exactOptionalPropertyTypes: true so callers can pass update={maybeUndefined} without a TypeScript error.

interface CauslProviderProps<Msg = unknown> {
    children: ReactNode;
    graph: Graph;
    update?: Update<Msg, Graph>;
}

Type Parameters

  • Msg = unknown

    The application's message union when an update runner is supplied; defaults to unknown for read-only setups.

Properties

children: ReactNode
graph: Graph
update?: Update<Msg, Graph>

Optional MVU runner. Note the explicit | undefined — required with exactOptionalPropertyTypes: true to allow the prop to be passed as update={maybeUndefined} cleanly.