Fluxor is a Flux implementation for Blazor in the vein of Redux. It is a state management system designed for larger software systems that encourages immutability of state, pure functions and clean separation of code. Given my fairly basic understanding of the Flux pattern I thought it would be valuable to document what it is at a high level and what’s required when using Fluxor to implement the various concepts.
Note that this is not a tutorial on Flux or Fluxor, both of those are covered quite nicely in the Fluxor Documentation already. This is my attempt to distill the two into a form that I at least will find useful to refer to. For more detailed implementation information, refer to the aforementioned tutorials.
[FeatureState] attribute.static to encourage pure functions, and have the [ReducerMethod] attribute in Fluxor.[EffectMethod] attribute in Fluxor.IActionSubscriber) that intercepts actions independent of the store.Fluxor.Blazor.Web.Components.FluxorComponent.StateChanged event and execute InvokeAsync(StateHasChanged). Don’t forget to unsubscribe!As an example, the CLI tutorial given on Fluxor’s docs does the following:
I’ve taken note of this as I particularly like the way the initial action is used to update the state by way of a reducer while also triggering the effect to load the data.
© Copyright 2025
Phil Watson
Last updated
Thursday, 29/May/2025 09:38 +1000
