A controller performs work
A formula returns a value into its result path. A controller runs behavior and makes its own writes. Use it when the event itself matters: capture a summary, request a transition or react to a published action.
A controller nested under a button runs on click. Parameters read with = supply the current values when the action executes. This is why a captured summary can remain unchanged while the live estimate continues to change.
Follow the trigger
The Controller example demonstrates Data changes, explicit firing, a delayed action and periodic behavior. Delay is measured in milliseconds; _timing is measured in seconds. They are different declarations of when work happens.
Before adding an action, state its trigger and the Data it writes. An action that runs on every keystroke has different consequences from one that runs only after a deliberate click.
Your turn
Try it yourself
- Open Button controller and identify the button and its child controller in Source.
- Change an input, click the action and inspect its output.
- Change the input again without clicking; explain whether the output should change.
Check your understanding
Would a continuously reactive formula be equivalent to a click-time summary?
Show the answer and expected result
No. A formula keeps following its reactive dependencies. A click action captures the values when invoked and leaves its result until another action updates it. The trigger is part of the behavior, not an implementation detail.