-
Notifications
You must be signed in to change notification settings - Fork 46.9k
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
React 18 - hydration of lazy component with sibling fails #23331
Comments
Can you try turning it into a failing test? You can use this one as a base.
|
Thanks for the suggestion on how to demonstrate this more clearly for the team. I managed to reproduce in the test environment: It happens when the server pushes a resolved lazy component but the client hasn't yet downloaded the component and therefore can't render it. I can observe the same workaround where wrapping the lazy component in its own personal |
Thanks! Can you please send it as a PR? Meaning just the failing test. |
Fixed by #23364 |
I seem to be hitting this same error hydrating an SSR rendered tree with If the lazy component has siblings I get:
unless I wrap each component in its own I forked the SSR code sandbox demo and removed the Old version (reproduces): https://codesandbox.io/s/elastic-oskar-vkc2gm?file=/src/App.js:1283-1339 I'm still pretty new to Suspense. Is this expected behavior? Update: It looks like I was using an old version of the demo in my fork. I can't seem to reproduce it with a modern version even though I'm seeing the same behavior on my app. I'll keep trying to reproduce. Update: Never mind. I missed #24384 until just now. If I use |
No prob. Sorry we haven’t released the fix in stable yet. |
Hello, I'm having an issue with hydration of SSR components using
renderToPipeableStream
andhydrateRoot
. I have a minimum reproduction case here: https://github.com/laverdet/react-issue. Just runnpm install; npm start
and navigate to localhost:8000.The error produced follows:
The relevant bits of implementation are reproduced below--
app.jsx
hot.jsx
If I wrap
Async
directly in a suspense element it will work:<Suspense fallback={null}><Async /></Suspense>
The text was updated successfully, but these errors were encountered: