app.handle
app/mainapp.handle(action: string, target: string, value: string)
Receives admitted UI and host events before the next render.
When to use it
Implement handle when the application reacts to controls, input, timers, navigation, lifecycle, media state, or other admitted host events.
Parameters
| Parameter | Type / values | Description |
|---|---|---|
| action | string | An onTap/onInput/onDismiss action or a host event such as lifecycle, timer, history, open_url, system_back, or media_state. |
| target | string | The stable component ID or host target such as app or browser. |
| value | string | The committed input value or bounded event payload; it may be empty. |
Returns
Nothing. State changes become visible in the render that follows the handler.
Focused example
local function handle(
action: string,
target: string,
value: string
)
-- Validate the event and update module state.
endContinue with a complete recipe
This checked recipe uses app.handle inside complete authored files with the required manifest, test, and run steps.
Open run a delayed action recipe