-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
[BUG] - Table component not compatible with Server Components #1574
Comments
I have the same problem. |
Hey please check this comment: #1403 (comment) |
Server-side rendering doesn't work in table components. The current workaround is "use client" It works fine for me. My dependencies,
|
Any catch up on this? |
I have already tried the solution of adding "@nextui-org/tablet" and using the "use client" in more nested components and the error continues |
This still happens here in Next.js 14 |
Same problem here on next15 |
Most of these bugs are generated because the use client is missing, although the library does not explain it, it probably uses react hooks which is why it fails. Solution: Use |
This is not really a solution but a workaround which adds unnecessary code to the frontend runtime. You should not be required to hydrate a static table... |
NextUI Version
2.0.20
Describe the bug
When trying to use the
Table
component (together with its respective subcomponents:TableHeader
,TableColumn
,TableBody
, etc.) in a Server Component, the rendering fails with an errorUnknown element <[object Object]> in collection.
Adding the
'use client'
directive at the top of the file fixes the issue.Is there any way to use the
Table
component natively in Server Components?Thanks!
Your Example Website or App
No response
Steps to Reproduce the Bug or Issue
Expected behavior
I expected the Table to be fully compatible with Server Components.
Screenshots or Videos
No response
Operating System Version
macOS
Browser
Safari
The text was updated successfully, but these errors were encountered: