- Uninstall the NuGet package Blazor.Fluxor and install the following:
- Fluxor
- Fluxor.Blazor.Web
- Fluxor.Blazor.Web.ReduxDevTools (if used in your app)
- Change the following namespaces in your source code
Blazor.FluxortoFluxorBlazor.Fluxor.ComponentstoFluxor.Blazor.Web.ComponentsBlazor.Fluxor.RoutingtoFluxor.Blazor.Web.Middlewares.RoutingBlazor.Fluxor.ReduxDevToolstoFluxor.Blazor.Web.ReduxDevTools
- When bootstrapping Fluxor, change the options in
services.AddFluxoras follows
- Change
UseDependencyInjectiontoScanAssemblies - Change
AddMiddleware<Blazor.Fluxor.Routing.RoutingMiddleware>();toUseRouting(); - Change
AddMiddleware<Blazor.Fluxor.ReduxDevTools.ReduxDevToolsMiddleware>();toUseReduxDevTools();
- Instead of using
<Blazor.Fluxor.StoreInitializer/>or callingStore.Initialize()in your razor file, add the following to yourApp.razorfile
<Fluxor.Blazor.Web.StoreInitializer/>
FluxorComponentnow implementsIDisposable, so overrideDispose(bool disposing)instead of implementingIDisposableyourself.- Change the script reference from
_content/Blazor.Fluxor/index.jsto_content/Fluxor.Blazor.Web/scripts/index.js - The
Goclass in the Routing namespace is now calledGoAction