Closed NamanGajjar26 closed 1 month ago
You need to initialize the store. Add the following to the GetCustomer.razor page.
<Fluxor.Blazor.Web.StoreInitializer />
Hi, Am using Blazor 8, and getting this error when I try to reload the page.. Please let me know how to resolve.
Can you send me a repro?
I am using blazor server application in asp .net core
there are Getcustomer razor page
`
Getcustomer
this call form console application in services make the three cs file CustomerState
` [FeatureState] public class CustomerState { public List Customers { get; private set; }
}` than make GetAllCustomersAction cs
public class GetAllCustomersAction { }
than make CustomerReducer cs
[ReducerMethod] public static CustomerState OnGetAllCustomers(CustomerState state, GetAllCustomersAction action) { using (var dbContext = new OnionArchitecturePro1Context()) // Replace YourDbContext with your actual DbContext class { var customers = dbContext.Customers.ToList(); return new CustomerState(customers); } }
and add startup cs in this service add
services.AddFluxor(options => { options.ScanAssemblies(typeof(Program).Assembly); options.UseReduxDevTools(); });