Managing state across multiple pages and components is the most complex part of a modern web app. In Blazor, you have two main choices.
A simple C# class registered as a **Scoped** service. It holds properties and raises an OnStateChanged event whenever a value is updated. Components subscribe to this event and call StateHasChanged(). This is easy to understand and perfect for medium-sized apps.
Fluxor is a library that brings the Flux pattern to .NET. It uses **Actions**, **Reducers**, and **Effects** to manage state in a predictable, unidirectional way. This is essential for massive enterprise apps where state changes can come from many different directions (user input, background workers, SignalR events).
Q: "Should I use Fluxor for everything?"
Architect Answer: "NO. Fluxor adds a significant amount of boilerplate. Only use it when your state management logic is complex enough to justify the overhead. For simple 'User Settings' or 'Current Selection', a simple State Container service is much faster to build and easier to debug."