Lynx

genui / openui / UseOpenUIStateOptions

UseOpenUIStateOptions

Inputs used to parse OpenUI text and build renderer state.

Properties

initialState?

optional initialState: Record<string, unknown>;

Defined in

@lynx-js/genui/openui/src/core/hooks/useOpenUIState.ts:91


isStreaming

isStreaming: boolean;

Defined in

@lynx-js/genui/openui/src/core/hooks/useOpenUIState.ts:88


library

library: CoreLibrary<ComponentRenderer<any>>;

Defined in

@lynx-js/genui/openui/src/core/hooks/useOpenUIState.ts:87


onAction()?

optional onAction: (event: ActionEvent) => void;

Parameters

ParameterType
eventActionEvent

Returns

void

Defined in

@lynx-js/genui/openui/src/core/hooks/useOpenUIState.ts:89


onError()?

optional onError: (errors: OpenUIError[]) => void;

Callback for structured, LLM-friendly errors. See OpenUIError type.

Parameters

ParameterType
errorsOpenUIError[]

Returns

void

Defined in

@lynx-js/genui/openui/src/core/hooks/useOpenUIState.ts:95


onStateUpdate()?

optional onStateUpdate: (state: Record<string, unknown>) => void;

Parameters

ParameterType
stateRecord<string, unknown>

Returns

void

Defined in

@lynx-js/genui/openui/src/core/hooks/useOpenUIState.ts:90


response

response: null | string;

Defined in

@lynx-js/genui/openui/src/core/hooks/useOpenUIState.ts:86


toolProvider?

optional toolProvider: any;

ToolProvider for Query data fetching — MCP, REST, GraphQL, or any backend.

Defined in

@lynx-js/genui/openui/src/core/hooks/useOpenUIState.ts:93

Except as otherwise noted, this work is licensed under a Creative Commons Attribution 4.0 International License, and code samples are licensed under the Apache License 2.0.