-
Notifications
You must be signed in to change notification settings - Fork 47.1k
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
useMutableSource hydration support #18771
Conversation
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit ec01142:
|
5fb3163
to
a7832bd
Compare
a7832bd
to
ca0e967
Compare
ca0e967
to
2e47d3a
Compare
a110dc2
to
29f8b13
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.
Implementation looks good but let's change the API to pass through the options object (if you agree).
No objection. I had made and stashed that change earlier because I didn't feel strongly about it. Just pushed it. |
(Back to you with the options change, @sebmarkbage ) |
Add hydration support for
useMutableSource
(resolves #18183)View diff without white space.
Usage example
MVP checklist
useOpaqueIdentifier
reads inside of aSuspense
boundary is valid (cc @lunaruan).Follow up work
mutableSourceEagerHydrationData
. We don't currently have a way to detect when all outstanding hydration work is finished. (It may never finish.) This means that in use cases where the version is the entire sore (e.g. an immutable store without a version "number") we would retain a reference to that store, preventing it from being GCed.