What libraries/techniques are available in Blazor for State management for webassembly (wasm).
It would be nice to know pros and cons of different approaches.
What libraries/techniques are available in Blazor for State management for webassembly (wasm).
It would be nice to know pros and cons of different approaches.
There are several options:
Redux (Fluxor)
Redux/Flux pattern has become a leader in state management in JS word; so it would make sense to adopt this best practice.
Luckily there is already a Fluxor library that does just that; and it does have the most github stars
379
; although it is still a relatively new area; so it remains to be seen what ends up being the most adopted approach later on.There is a great intro video along with source code
Official docs:
An in depth article.
Blazor-State
Blazor-State
Pros: uses MediatR for messaging
See also
Overviews of State Management Approaches
https://chrissainty.com/mobile-blazor-bindings-state-management-and-data/
https://jonhilton.net/blazor-state-management/
https://learn.microsoft.com/en-us/aspnet/core/blazor/state-management
nice but mostly messaging: https://jasonwatmore.com/post/2020/07/30/aspnet-core-blazor-webassembly-communication-between-components
keywords: passing data between blazor wasm webassembly components child parent attributes events handling