-
Notifications
You must be signed in to change notification settings - Fork 27.3k
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
Server-side rendering links incorrect component #16796
Comments
Testing the reproduction repo, 9.0.6 renders styling properly, but still shows this warning: Searching a little bit further, the same behavior occurs until 9.0.7-canary.9, when Suspense component was dropped in #8887 due to problems with React. Building a custom version of Next, (9.5.4-canary.15) re-including Suspense where it used to be solves your problem, but creates the same warning mentioned above (without the Source map error part). If I'm not mistaken, it's a dev-only warning, so it doesn't show in production. I don't know if that would be a proper solution, since it fixes one thing and 'breaks' (or might break) another. What do you guys think? @SimplyComplexable @timneutkens Edit: Linking @Timer since he was the author of PR #8887 Is putting back Suspense a doable solution? |
I had a similar issue, I think I went around it by setting a state variable in a useEffect that acts as |
this issue is quite old and it was probably resolved already since it was mentioned that including suspense fixes this. |
Going to close this as it's a hydration mismatch, latest version of Next.js will show the error overlay for this case, it should indeed use |
This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Bug report
Describe the bug
I have certain circumstances where a component is rendered differently on the server then the client due to certain data being available.
In next versions prior to v9.0.7 this didn't cause any issues, but in every version since Next gets confused about which component is being rendered and starts to mix up the styles
To Reproduce
See the reproduction repo here
As stated in the README
If you downgrade next to 9.0.6 it will render correctly regardless
Expected behavior
It should render correctly regardless.
Screenshots
System information
Additional context
The text was updated successfully, but these errors were encountered: