You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Table is meant to be rendered with no hydration errors, but hydration error appears after having rendered the table, the table code was taken from W3Schools and HTML is valid. Error mentions that tr cannot be inside a table tag.
Provide environment information
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 24.2.0: Fri Dec 6 18:51:28 PST 2024; root:xnu-11215.61.5~2/RELEASE_ARM64_T8112
Available memory (MB): 8192
Available CPU cores: 8
Binaries:
Node: 23.4.0
npm: 11.0.0
Yarn: N/A
pnpm: 9.15.0
Relevant Packages:
next: 14.2.3 // An outdated version detected (latest is 15.1.2), upgrade is highly recommended!
eslint-config-next: N/A
react: 18.3.1
react-dom: 18.3.1
typescript: 5.3.3
Next.js Config:
output: N/A
⚠ An outdated version detected (latest is 15.1.2), upgrade is highly recommended!
Please try the latest canary version (`npm install next@canary`) to confirm the issue still exists before creating a new issue.
Read more - https://nextjs.org/docs/messages/opening-an-issue
Which area(s) are affected? (Select all that apply)
Not sure
Which stage(s) are affected? (Select all that apply)
next dev (local)
Additional context
No response
The text was updated successfully, but these errors were encountered:
You can even disable JavaScript, and the tbody is injected there by the browser.
Then React runs hydration, expecting no tbody element, and that leads to an error.
This is specially confusing because, programatically, you can create the first structure with JavaScript on the browser.
Don't believe me? Go to codepen by writing pen.new on your browser address bar, paste the first HTML structure, and see what gets rendered instead, a tbody out of nowhere, no React, no Next.js:
So yeah, that's what's up. There's a similar situation with nested p's as well.
Which is often, what pure CSR React would allow you to do, sort of, but as I've shown, these are not valid HTML nesting to begin with, which is why the server string is "patched" by the browser.
Link to the code that reproduces this issue
https://github.com/RakibulBh/mydeen-waitlist
To Reproduce
Container for the table
Tabel component
Current vs. Expected behavior
Table is meant to be rendered with no hydration errors, but hydration error appears after having rendered the table, the table code was taken from W3Schools and HTML is valid. Error mentions that
tr
cannot be inside atable
tag.Provide environment information
Which area(s) are affected? (Select all that apply)
Not sure
Which stage(s) are affected? (Select all that apply)
next dev (local)
Additional context
No response
The text was updated successfully, but these errors were encountered: