Next.js Discord

Discord Forum

Add Metadata while using "use client"

Unanswered
Giant panda posted this in #help-forum
Open in Discord
Giant pandaOP
^^^^

6 Replies

Giant pandaOP
layout.js
remove 'use client'?
remove use client and create an client component with the rest of your code
basically what lutherr said, but you keep the main component as server and put the "client" part in a separate file that is imported: https://nextjs-faq.com/metadata-client-components