这是开发预览网站。请访问正式文档 lynxjs.org

Home > @lynx-js/genui > A2UIProps > onAction

A2UIProps.onAction property

Called when a user action fires inside the rendered tree (button tap, etc.). Forward to your agent and push the response messages back into the same messageStore to update the UI. Fire-and-forget; the renderer never awaits this.

Signature:

onAction?: (action: UserActionPayload) => void;