Replies: 1 comment 3 replies
-
Thanks for opening up a discussion.
What would be recommended it to move more parts to client components while those libraries don't support server components yet. In that sense, doing things behind the scene might confuse the user more. |
Beta Was this translation helpful? Give feedback.
-
It would be great if there is a easy way to specify which vendor component packages are client components. This would allow server components to import vendor client components more easily.
Background
Currently, when you import a client component from a vendor package into your server component, like this:
you will encounter the error:
This is because not all vendor component libraries have 'use client' explicitly defined. One solution is to create a wrapper file with 'use client' directive.
However, it is still not ideal as they require creating additional file for each vendor component.
Proposal
Allow client package defined by config (
package.json
, or maybe in the futurewaku.config.json
)Beta Was this translation helpful? Give feedback.
All reactions