Is "use client"; inherited ?
Answered
Eurasian Blackbird posted this in #help-forum
Eurasian BlackbirdOP
If I have a component like this
Will my <bar /> componenet be a client component if I don't declare "use client"; in it ?
"use client";
import bar from '...'
export default function foo() {
return <div><bar /><div>Will my <bar /> componenet be a client component if I don't declare "use client"; in it ?
2 Replies
Northern Wheatear
Yes bar will be a client component
Answer
@Northern Wheatear Yes bar will be a client component
Eurasian BlackbirdOP
thank you