Skip to content

mountBotMessage

mountBotMessage<Host, Message, Snapshot, Interaction, Props, R, E>(options): Effect<{ message: Message; root: BotMessageRoot<Host, Message, Snapshot, Interaction>; }, MessageTargetError | MessageMountError | E, R>

Defined in: packages/core/src/message/mount.ts:203

Shared message lifecycle for node-based bot platforms.

It mounts the component tree in a fiber owned by the returned root’s Scope, waits for the platform target’s first message, and returns an explicitly closable root. Closing the root closes the Scope, which releases the renderer, query cache, target fiber and every Layer built for the message.

Host

Message

Snapshot

Interaction

Props

R = never

E = never

MountBotMessageOptions<Host, Message, Snapshot, Interaction, Props, R, E>

Effect<{ message: Message; root: BotMessageRoot<Host, Message, Snapshot, Interaction>; }, MessageTargetError | MessageMountError | E, R>