Skip to content

Conversation

@felixb-wix
Copy link
Contributor

No description provided.

@felixb-wix felixb-wix marked this pull request as draft February 14, 2021 09:16
@felixb-wix felixb-wix requested a review from itsh01 February 14, 2021 09:17
@felixb-wix
Copy link
Contributor Author

Concept:

  • both kinds of observables have the same interface ObservableState
  • the chained observable takes multiple observables as an input ("sources"), and subscribes to each. When any of the source observables raises a notification, the chained observables's own subscribers get notified.

What I do in this PR:

  • remove current() from ObservableState
  • add createChainedObservable() to Shell

Open issues:

  • the chained observables don't have any lifecycle mechanism (like React's componentWillUnmount), so currently they have no way to unsubscribe from the sources. A possible solution is use WeakRef for the subscribers.
  • it is possible to accidentally create endless loops

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants