-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add PubSub and ReactiveStore utilities #486
Add PubSub and ReactiveStore utilities #486
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really love this, and can't wait to try it out in the movie tool stuff!
*/ | ||
export default class PubSub { | ||
constructor() { | ||
this._subscribers = new Map(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: if you do feel like using #privateVariables
, feel free! We've started using them more liberally in core lately.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool! I didn't know we officially supported the new syntax now. I'll make a separate PR to update these once I have a bit of time again.
🎉 This PR is included in version 2.10.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This adds the new
ReactiveStore
utility (and adds thePubSub
utility since the Reactive Store is dependent on it).This PR is pretty big since it includes fairly detailed READMEs and tests for both the
ReactiveStore
andPubSub
utilities, as well as demos for theReactiveStore
.See the prototype sandbox for the
ReactiveStore
here: https://codesandbox.io/p/sandbox/reactive-store-prototype-vhz76g?workspaceId=ws_FRqmQNTVG95dm2hG2FbpSi