Your Blazor State Might Belong in the URL
When building a Blazor component, storing UI state directly inside class fields is the default instinct: C# private string ? searchText; private string ? status; private string sortColumn = "Name" ; private int page = 1 ; There’s nothing inherently broken about this. But think about the user experience. A user spends three minutes filtering down a customer list: they search for "Microsoft" , filter by Active , sort by LastContact , and jump to page 3 . Their screen shows a precise slice of data. Yet, their browser address bar still stubbornly reads: /customers If they refresh, their work is wiped out. If they bookmark the page, they lose the context. If they drop that link into Teams or Slack for a colleague, the recipient lands on page 1 of an unfiltered list. Compare that to: /customers?search=Microsoft&status=Active&sort=LastContact&page=3 By shifting page-level view parameters into query strings, the URL becomes a deterministic blueprint of ...