Skip to content

christoment/BlazorWithRedux

Repository files navigation

BlazorWithRedux

Implementing Redux pattern in Blazor WebAssembly using .NET 8 and Fluxor. You can also find the related YouTube video here.

Prerequisites

Dependencies added

  • Fluxor.Blazor.Web v5.9.1
  • Fluxor.Blazor.Web.ReduxDevTools v5.9.1

F5 Experience

  1. Clone this repository
    git clone https://github.com/christoment/BlazorWithRedux
  2. Restore dependencies using
    dotnet restore
  3. Run Blazor WebAssembly in watch mode.
    dotnet watch run
  4. Your default browser should automatically opened for you. Navigate to the Counter page to see the example.

Important Installation Notes on Fluxor

As per Fluxor v5.4.0, Fluxor requires the following additional setup:

  1. Store initialiser + DOM for the ReduxDevTool to look for in App.razor:
    <Fluxor.Blazor.Web.StoreInitializer/>
  2. Fluxor initialisation in Program.cs
    builder.Services.AddFluxor(options =>
    {
     options
       .ScanAssemblies(typeof(Program).Assembly)
       .UseReduxDevTools();
    });

About

Blazor WebAssembly with Redux patern using .NET 7 and Fluxor

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published