-
Notifications
You must be signed in to change notification settings - Fork 139
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
Feature: provide a way to supply IStateChangedNotifier to FluxorComponent #340
Comments
Components should only subscribe to parts of state they are interested in, not everything. |
I misspoke sorry, I meant that I want to encapsulate all relevant state for a single entity (Todo) into a facade. public interface ITodoFacade
{
void Load();
Todo Get(string id);
IState<TodoState> State { get; }
// etc..
} |
Can't you also implement IStateChangedNotifier on that and FluxorComponent will pick it up? |
Yes, for some reason when I looked at the code it looked like a more complex interface. |
Just to be clear. I think if you descend your interface from IStateChangedNotifier, then FluxorComponent/FluxorLayout will detect it when it scans for injected properties and will automatically re-render when it triggers its event. |
Yes, that worked perfectly thanks, 5 lines and done.
Thanks again.
…On Tue, 16 Aug 2022, 21:11 Peter Morris, ***@***.***> wrote:
Just to be clear.
I think if you descend your interface from IStateChangedNotifier, *then*
FluxorComponent/FluxorLayout will detect it when it scans for injected
properties and will automatically re-render when it triggers its event.
—
Reply to this email directly, view it on GitHub
<#340 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ARZ4JES3NE7ZH6HVYADX3CLVZNZN3ANCNFSM56GWVW4A>
.
You are receiving this because you modified the open/close state.Message
ID: ***@***.***>
|
I want to encapsulate all state into a Facade, including IState.
This is not possible with
FluxorComponent
as relies on anIStateChangedNotifier
member to be present.Would it be accepted if I opened a PR to support the following which would be integrated into the collection of states
The text was updated successfully, but these errors were encountered: