Blazor-Redux 0.0.6

Install-Package Blazor-Redux -Version 0.0.6
dotnet add package Blazor-Redux --version 0.0.6
<PackageReference Include="Blazor-Redux" Version="0.0.6" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Blazor-Redux --version 0.0.6
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Blazor-Redux, 0.0.6"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install Blazor-Redux as a Cake Addin
#addin nuget:?package=Blazor-Redux&version=0.0.6

// Install Blazor-Redux as a Cake Tool
#tool nuget:?package=Blazor-Redux&version=0.0.6
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Blazor Redux

This library offers Redux-style state management for Blazor, with support for both C# and F#. The implementation is based on Redux.NET.

The combination of Blazor and Redux becomes an incredibly compelling platform for frontend development—more compelling than any other alternative, if you ask me:

  • Blazor uses .NET, thus comes with a strong type-system built-in, like Elm, Purescript, OCaml, and to some degree Typescript.
  • With ASP.NET already such a viable option for the backend, this opens up for a very strong isomorphic apps model with shared .NET code on the frontend and backend.
  • The Razor view engine combines the power of a templating engine with the familiarity of HTML, like JSX. With Redux, the Blazor pages themselves become very simple, with just presentational content, references to state in the store, and dispatching of actions.
  • When it comes to productivity, Blazor can feel like one of the specialized proprietary platforms such as Silverlight and Flash, but it does in fact produce web standard-compliant code compatible with all major browsers and devices without any plugins.
  • Blazor is actual .NET assemblies running on Mono compiled for WebAssembly. While this may sound excessive in terms of download size, both Mono and the .NET library are less than a megabyte in size.
  • Blazor comes with strong backing from a solid organization (Microsoft).

Advantages over vanilla Blazor

  • Implements a one-way model-update-view architecture, by many considered to be more robust and easier to reason about than a two-way data binding as found in Angular.
  • Application state is kept in a single state store, facilitating advanced features such as undo/redo, hydration of application state, and time-traveling debuggers.
  • Any Blazor component upgraded to a Redux component will subscribe to changes in the state store and automatically update its view, so you don't have to worry about calling StateHasChanged().
  • Blazor Redux supports F#, which means you can take advantage of some advanced language features when designing your types, actions and reducer logic. The discriminated union types are perfect for designing type-safe application messages, and the with keyword in record types makes it simple to work with immutable types in your reducer logic. Not to mention that a model with many small types can be created with much less ceremony. F# lends itself well to type driven development. However, the Blazor project itself and the Razor pages must be C#.

More info

More documentation is available on GitHub.


Blazor Redux is at an experimental stage, and you should expect breaking changes. But I'd be very interested in discussing the design and potential features. Please open an issue if you have any particular topic in mind.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Blazor-Redux:

Package Downloads

Blazor rendering with F# and state management with BlazorRedux.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.0.6 3,825 11/6/2018
0.0.5 887 4/22/2018
0.0.4 592 4/19/2018
0.0.3 650 4/10/2018
0.0.2 734 4/7/2018
0.0.1 570 4/3/2018

Updated for Blazor 0.6.0, with contributions from Sergey Solin.