ui icon indicating copy to clipboard operation
ui copied to clipboard

fix(v4): 6888 - Remove unnecessary "use client" directives

Open Jacksonmills opened this issue 9 months ago • 2 comments

Removes redundant "use client" directives from multiple UI components. Ensures functionality remains intact without these directives.

Fixes rest of: #6888

Jacksonmills avatar Mar 14 '25 19:03 Jacksonmills

@Jacksonmills is attempting to deploy a commit to the shadcn-pro Team on Vercel.

A member of the Team first needs to authorize it.

vercel[bot] avatar Mar 14 '25 19:03 vercel[bot]

alright this should be good now, tested all in server side demos to be sure

Jacksonmills avatar Mar 14 '25 21:03 Jacksonmills

I don't think this is right for all components, for example the avatar component from radix uses createContextScope() (this is radix's wrapper for React.createContext) and React.useState, which can only be used client side. So it's good that a shadcn components provide the proper "use client" at the top for files that have this, so we don't have to deal with it.

Note: The same is true for accordion, but I haven't checked all components listed in the PR.

n2k3 avatar Sep 17 '25 07:09 n2k3