pub type StateHandlerFn = dyn Fn(StateHandlerInput<'_>) + Send + Sync;
Expand description
A StateHandlerFn
is a function that handles state changes for a component.
The rule of execution order is:
- Children’s state handlers are executed earlier than parent’s.
- Newer components’ state handlers are executed earlier than older ones.
Acutally, rule 2 includes rule 1, because a newer component is always a child of an older component :)