-
-
Notifications
You must be signed in to change notification settings - Fork 147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inheriting fluxorcomponent #51
Comments
You can get notifications using this event https://github.com/mrpmorris/Fluxor/blob/master/Source/Fluxor/IState.cs#L31 But don't forget to implement IDisposable and remove your subscription. If any class in the hierarchy is FluxorComponent then it should all work automatically. If it isn't, can you provide me with an example app? |
I'll close this for now. Let me know if the problem isn't resolved and I'll reopen it. |
I am just getting my feet wet with Fluxor and I find it indeed very intuitive and accessible! Thx! Just fell over this issue since my Fluxor component did not update either. This was my fault because I had implemented an override of OnInitialized() and forgot to call up to base.OnInitialized(). Thus the subscription to state changes in the OnInitialized() method in FluxorComponent base class was never done. Maybe @carlblanchard had the same issue? |
Could be. It wouldn't be the first time. This is why I always call the base, even if I know it does nothing :) |
For me, it turned out that Blazor was erroring before hitting my dispatcher. |
Loving the library, good work.
This is probably PEBKAC but if you don't ask you don't know.
My parent component 'A', currently inherits my base component 'B'. I tried updating my base component 'B' to derive from your Fluxorcomponent but sadly It seems I have to directly inherit your Fluxorcomponent in my main component 'A', otherwise, nothing refreshes when the state changes. Why is this?
Do you have any examples of implementing when I can't inherit your FluxorComponent.
The text was updated successfully, but these errors were encountered: