I'm novice with using Blazor and Fluxor, and I trying to deside what is better to use
IActionSubscriber - manually inject, subscribe and unsubscribe
or
inherit FluxorComponent - and use the ActionSubscriber
What is the best solution? What is benefits and disadvantages?
Descending from FluxorComponent will mean your component automatically subscribes to
StateChanged
on anyIState<T>
property - when triggered it will callInvokeAsync(StateHasChanged
to ensure the UI is updated.IActionSubscriber
isn't meant for determining when to update the UI, but to allow the UI to catch data that doesn't get reduced into the store. For example, an editable DTO from a server API for the current page to edit.