Skip to content

Why do most components have "use client"? #1413

Closed Answered by zeekrey
kondo0602 asked this question in Q&A
Discussion options

You must be logged in to vote

The useClient is essential whenever an event listener is utilized - just as you mentioned. If you take a glance at the radix label primitive, you'll notice that it employs onMouseDown.

It's likely that the majority of primitives employ various event listeners, which is why the wrapper component includes the useClient directive.

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@kondo0602
Comment options

Answer selected by kondo0602
Comment options

You must be logged in to vote
1 reply
@kondo0602
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants