Closed WhitWaldo closed 1 year ago
My guess is that the conponent is being created, then dependency injection runs in order to update your Inject properties but throws an exception, then the component is Disposed before OnInitialized has been called.
StoreInitializer has an event for unhandled exceptions
https://github.com/mrpmorris/Fluxor/blob/master/Source/Lib/Fluxor.Blazor.Web/StoreInitializer.cs#L17
Try hooking that up to see if it is triggered with an exception that can give you more information.
You're right - I scrolled up in the debug window and there was an exception throwing beforehand about a parameter being populated that didn't exist on the component. Removed that and it works like a charm. Thank you!
You're welcome :)
I'm attempting to use this in a Blazor Server project and simply cannot figure out what I'm missing that's causing it not to just work.
In program.cs:
I have the
<Fluxor.Blazor.Web.StoreInitializer/>
at the top of my App.razor file.ConditionComponentState.cs:
And finally my component:
As soon as I click the button responsible for displaying this component, an exception is thrown:
Fluxor seems like the perfect fit for my state needs but I cannot for the life of me figure out why this isn't working. Can anyone shed any light on what I'm missing here?
Thank you!