Skip to content

Latest commit

 

History

1,178 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

blazor-state banner

Blazor State

Atypical-Consulting - blazor-state Top language Stars Forks License

Issues Pull requests Last commit

Features

  • Four state-management paradigms — MVU, source-generated, Redux and Zustand — as independent packages
  • A mutation utility (utils/mutty) the libs can build on
  • Runnable samples for MVVM and reactive patterns

Usage

git clone https://github.com/Atypical-Consulting/blazor-state.git
cd blazor-state/libs/mvu   # or ducky / bustand / the-blazor-state
dotnet build

Table of Contents

State management for Blazor — four paradigms, one home. Pick the approach that fits how you think: Elm-style MVU, source-generated state, Redux, or Zustand.

Consolidated from separate repositories (full git history preserved). The libraries are independent packages — you use one, not all.

Libraries

Lib Paradigm Pitch From
libs/mvu MVU (Elm) Model-View-Update pattern for Blazor Atypical-Consulting/BlazorMVU ★
libs/the-blazor-state Source generators [Persist] / [Shared] attributes, pluggable storage, cross-tab sync Atypical-Consulting/TheBlazorState
libs/ducky Redux Predictable, centralized state container for .NET phmatray/Ducky ★
libs/bustand Zustand Minimal boilerplate, immutable records, time-travel DevTools phmatray/Bustand

Utility

Path What it is From
utils/mutty Immutable record mutation made easy — a helper the state libs can build on phmatray/Mutty ★

Samples

Path Shows From
samples/mvvm-todo MVVM Todo app with CommunityToolkit.Mvvm phmatray/BlazorMvvmApp
samples/reactive-patterns Reactive programming patterns with Object Calisthenics phmatray/Reactif

Which should I use?

  • mvu — you like Elm's single-message-loop model.
  • the-blazor-state — you want state that persists and syncs across tabs with minimal code.
  • ducky — you're coming from Redux and want actions/reducers.
  • bustand — you want the smallest possible store with great DevTools.

History

Each folder was merged with full git history preserved (git subtree). The original repositories are archived and redirect here.

Tech Stack

  • .NET 10
  • Microsoft.AspNetCore.Components.WebAssembly
  • Microsoft.AspNetCore.Components.WebAssembly.Server
  • Bustand
  • CompareNETObjects
  • Scrutor
  • bunit
  • NSubstitute
  • xunit.v3

Roadmap

Planned work and known limitations are tracked in the open issues. Contributions toward them are welcome.

License

MIT — see LICENSE.


Contributing

Contributions are welcome. Open an issue first to discuss any significant change.

  1. Fork the repository and create your branch (git checkout -b feat/my-feature)
  2. Commit your changes (git commit -m 'feat: ...')
  3. Push the branch and open a Pull Request

About

State management for Blazor — four paradigms (MVU, source-generated, Redux, Zustand) + a mutation utility, in one monorepo.

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages