mrpmorris / Fluxor

Fluxor is a zero boilerplate Flux/Redux library for Microsoft .NET and Blazor.
MIT License
1.22k stars 139 forks source link

.NET MAUI Hybrid App Demo #492

Open fossbrandon opened 3 weeks ago

fossbrandon commented 3 weeks ago

I'm starting to create a .NET MAUI blazor hybrid app and I am looking for a state management solution to keep my state updated between my MainLayout component and a nested settings page. Fluxor seems promising for my needs, but I've run into small issues during setup since I'm following the Blazor setup tutorial which doesn't 1 to 1 match the setup needed for a MAUI hybrid app. I've solved some of the issues such as registering Fluxor as a singleton in MauiProgram.cs, adding <Fluxor.Blazor.Web.StoreInitializer/> to MainLayout.razor instead of App.razor because that file does not exist in this project, and utilizing something like StateSubscriber in our components such as MainLayout.razor that already inherit from a different base component like LayoutComponentBase. I had to find answers throughout various other issues and discussions, and I think it would be easier if a demo project/documentation were added instead to quickly walk a new user through the MAUI blazor hybrid specific setup.

I know this could be a big time commitment so maybe I could implement this myself after I get further along and make sure it's all working as expected. However,I would also be interested in having someone else who has gone through this before create the demo so that I could compare it to what I've done and make sure I am going down the right path as I'm not even sure my implementation is optimal.

mrpmorris commented 3 weeks ago

If you create a simple example of the counter page + weatherforecast (even if the effect merely simulates fetching from an API) then I'll be happy to have a look.

fossbrandon commented 3 weeks ago

Ok, I'll continue to work on my project and if I get to a point where I'm happy with the implementation I'll go ahead and add a demo project here for you and others to review.