server components in context provider
Unanswered
English Angora posted this in #help-forum
English AngoraOP
If I fetch data in app/layout.tsx and add it to the context (context provider is wrapping everything in the layout), will the page.tsx and other components inside still be able to be server components (as long as I don't use useContext in them)? Or if the layout is a client component, will everything inside be re-rendered?
1 Reply
Entlebucher Mountain Dog
afaik, yes they are server components. try to explicitly state
"use server"
and then you'll be able to see for yourself!