Using extendVariants in RSC cause error and why import from /react? #2251
Unanswered
J4v4Scr1pt
asked this question in
Help
Replies: 1 comment
-
I too have this issue, except I do want to use it in a server component. :( |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have the need to extend some components with our own colors and followed the guide.
First of the button needs to have the
'use client'
directive to be used in a RSC otherwise I get this error:Error: Cannot access displayName.toString on the server. You cannot dot into a client module from a server component. You can only pass the imported name through.
This breaks this part of the docs..
Maybe not the biggest issue tough because the button will prob be used in a client component anyways.. but still.
And why do we need to import extendVariants from /react but the docs states that it should be avoided?
This is the button:
Beta Was this translation helpful? Give feedback.
All reactions