-
Notifications
You must be signed in to change notification settings - Fork 35
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
0.10.0 (3) switch rehydration mismatch protection to useSyncExternalStore
#207
Conversation
// one rerender with the actual client value (which is hopefull equal) | ||
assert.equal(finishedRenderCount, 2); | ||
assert.equal(finishedRenderCount, 1); |
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 a nice improvement since it removes a double render that would in reality only be necessary on a server<->client race condition.
} | ||
|
||
await testIn("browser")( | ||
"race condition: client ahead of server renders without hydration mismatch", |
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.
Our first test that directly tests stream rehydration 🎉
size-limit report 📦
|
Job #107: Bundle Size — 1.01MiB (~-0.01%).Warning Bundle contains 1 duplicate package – View duplicate packages Bundle metrics
|
Current Job #107 |
Baseline Job #104 |
|
---|---|---|
Initial JS | 890.58KiB (~-0.01% ) |
890.59KiB |
Initial CSS | 0B |
0B |
Cache Invalidation | 21.11% |
0.04% |
Chunks | 24 |
24 |
Assets | 45 |
45 |
Modules | 512 |
512 |
Duplicate Modules | 30 |
30 |
Duplicate Code | 1.29% |
1.29% |
Packages | 29 |
29 |
Duplicate Packages | 1 |
1 |
Bundle size by type 1 change
1 improvement
Current Job #107 |
Baseline Job #104 |
|
---|---|---|
JS | 1023.84KiB (~-0.01% ) |
1023.85KiB |
Other | 5.99KiB |
5.99KiB |
View job #107 report View pr/uSES branch activity View project dashboard
useSyncExternalStore
useSyncExternalStore
packages/client-react-streaming/src/DataTransportAbstraction/WrappedApolloClient.test.tsx
Outdated
Show resolved
Hide resolved
document.body.innerHTML, | ||
`<!--$--><div id="user">Future me.</div><div id="parallel">suspending in parallel</div><!--/$-->` | ||
); | ||
} |
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 super cool 🎉
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.
Nice work!
…rappedApolloClient.test.tsx Co-authored-by: Jerel Miller <jerelmiller@gmail.com>
This would have been the right implementation from the start, but we couldn't do it in the beginning because of a bug in the canary version used at that time. Now it seems to be working nicely.