- 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.Fluxor
toFluxor
Blazor.Fluxor.Components
toFluxor.Blazor.Web.Components
Blazor.Fluxor.Routing
toFluxor.Blazor.Web.Middlewares.Routing
Blazor.Fluxor.ReduxDevTools
toFluxor.Blazor.Web.ReduxDevTools
- When bootstrapping Fluxor, change the options in
services.AddFluxor
as follows
- Change
UseDependencyInjection
toScanAssemblies
- 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.razor
file
<Fluxor.Blazor.Web.StoreInitializer/>
FluxorComponent
now implementsIDisposable
, so overrideDispose(bool disposing)
instead of implementingIDisposable
yourself.- Change the script reference from
_content/Blazor.Fluxor/index.js
to_content/Fluxor.Blazor.Web/scripts/index.js
- The
Go
class in the Routing namespace is now calledGoAction