-
Notifications
You must be signed in to change notification settings - Fork 26
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
how to use this feature with React Suspense on the server side? #28
Comments
Hiya, sorry for the late reply! 👋 This is a discrepancy on So the right thing to do is to not use |
In place of the regular The only problem with this is that React will log some warnings when rehydrating browser-side after SSR, since what's rendered on the browser is supposed to match what was rendered on the server.
The above warning is actually wrong about the specifics. The html tree is the exact same on server & browser; only the React element tree is different. But are these warnings in any way valid? @kitten Any chance we can reopen this? |
I recognize that this is not an issue with this package, but an issue sorta goes with this package. This package solves one part of the problem (using React Suspense APIs in components that will be SSRd), and this issue is the second part of that problem. |
@zenflow This should (or rather used to?) actually work since React introduced an exception to their SSR mismatch checks that accepted an added Edit: I can't really find the affected code in the React codebase anymore. So this behaviour may have changed in a minor release. I'm wondering whether this change has moved over to the new Further, I don't think we can reopen this since it's not actionable. There's nothing we can do about this warning if React decided to re-add it unfortunately. |
@zenflow Did you ever find a workaround for this issue? |
@jesster2k10 My workaround in the end was to ignore the warnings. I don't believe they are actually valid, because of the reasoning above: "The html tree is the exact same on server & browser; only the React element tree is different." If the html tree actually differed from server to browser (as the warning implies) then we would have a problem, but I don't see the problem with the React element tree differing. |
I did something as the abive, still get the two errors
The text was updated successfully, but these errors were encountered: