-
Notifications
You must be signed in to change notification settings - Fork 57
React hooks for sync streams #717
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
Conversation
🦋 Changeset detectedLatest commit: c694022 The changes in this PR will be included in the next version bump. This PR includes changesets to release 9 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
82d316d
to
1818220
Compare
f0b2494
to
2926132
Compare
2926132
to
c06cafe
Compare
6056467
to
d6290a4
Compare
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.
Happy with the changes :)
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.
🚀 This is very cool
This updates the
react
package to expose hooks for sync streams:useSyncStream()
hook has been added. It takes name and parameters of the stream, along with optional subscription options. When called, it:useQuery()
hook has been updated to optionally take an array of streams as well.useSyncStream()
, it subscribes to those streams while the component is active.I've also fixed a few minor issues with the sync stream implementation in this PR.