This is the dev preview website. Check out the document at 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;