Skip to content

Subscribing observables to other observables #48

Description

@WhitWaldo

I'd like to have observables be able to subscribe directly to other observables so they might update their own values reactively.

Today, I can solve this imperatively. If I have a ParentStore and a ChildStore, I can inject the latter into the former. Within ParentStore, when an action method is called to update a value imperatively, I can point to my ChildStore reference and imperatively call an action on it in order to effect some changed value on it.

The downside to doing it this way is that my DI registration winds up having to be far too knowledgeable about what stores are intending to be subscribed to what as I fill the constructor of each store with injected instances of each other dependent store. Further, it's suddenly not reactive so much as imperative, leaving the only reactive component being the state rendered in Blazor.

What am I missing that would allow observables to subscribe to values on other observables and in turn be able to change their own values? Thank you!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions