#Client side component inside Server Side component
9 messages · Page 1 of 1 (latest)
import 'em
it will throw error saying you can't use "useState" "useEffect" hooks inside the server side rendered component
don't import the hook, import the client component
also use 'use client' in the client component
client componet contains hooks thats why it is giving error
how did you import them?
you should do them like this, credit: joulev
Hi I try to have answer here so as not to recreate post.
Is import client component in layout is required, or may We import em in the page file. Because It seems that when I do so, it throw an error "no parent client component" till I use "use client" in my page... 😦