State Observer
Interface for observing state changes.
State observers are notified when state transitions occur, allowing for reactive programming patterns and side effects to be handled separately from state logic.
Parameters
T
The type of state being observed
Functions
Link copied to clipboard
Creates a StateObserver that only reacts when a predicate is satisfied.
Link copied to clipboard
Creates a StateObserver that only reacts to specific state types.
Link copied to clipboard
Creates a StateObserver that only reacts to actual state changes (not same state).
Link copied to clipboard
Convenience observer that only cares about the new state.
Link copied to clipboard
Called when a state change occurs.