Can a page.js file be a client component?
Answered
Carolina Dog posted this in #help-forum
Carolina DogOP
When I tried using export const metadata it doesn't work if the page is a client component. Is there a way to make this possible or the only way is just to put the client component deeper? Thanks
Answered by Giant panda
Move the page content into a client component. The metadata API only works for server-side pages.
2 Replies
Giant panda
Move the page content into a client component. The metadata API only works for server-side pages.
Answer
@Giant panda Move the page content into a client component. The metadata API only works for server-side pages.
Carolina DogOP
Okay, Thank you.