State Management Demo
Demonstrates SwapState: maintaining complex UI state across requests without manual serialization. State is transparently preserved in the DOM and restored on the server.
1. URL & Filter State
Try searching, pagination, and sorting. The state is automatically serialized into query parameters or payload.
2. Multi-Step Form Wizard
Data entered in previous steps is preserved automatically as you navigate forward and backward.
No hidden inputs required manually - the swap-state tag helper handles it.
3. Dashboard (State Persistence)
State persistence works even with partial updates. Clicking a card updates both the card (expanded state) and the global click counter, proving the state object was round-tripped and updated.
Live Dashboard
Global Clicks: 0Click a card to expand/collapse details. Notice how the "Global Clicks" counter increments even though we are interacting with specific cards. The entire state object is being round-tripped.