Natural PHP and explicit actions
Simple mutations such as ++, --, assignments, arithmetic, ternaries, if/else, arrays, and supported function calls can remain natural PHP. ClientAction remains available for explicit composition.
Button('Add')->onClick(fn () => $this->count++);
Button('Reset')->onClick(ClientAction::set('count', 0));State references remain live
StateRef points to the current browser value. It avoids freezing the server-rendered value inside later operations.
Conditions and collections
When, loops, array append/remove/sort, and compiled PHP conditions update only the relevant UI bindings.