metadata not working after implementing next-themes
Answered
ncls. posted this in #help-forum
ncls.OP
So I just installed the
I then noticed that my page title is suddenly just displaying
This is just not working afterwards:
Does someone know why that is and how to fix it?
next-themes package and implemented it using the documentation: https://github.com/pacocoursey/next-themes#with-appI then noticed that my page title is suddenly just displaying
localhost:3000/ again and I checked another project where I installed next-themes and same issue.This is just not working afterwards:
export const metadata: Metadata = {
title: 'My Next App',
description: 'Generated by create next app',
}Does someone know why that is and how to fix it?
8 Replies
@joulev can you give us a reproduction repository
ncls.OP
I struggle a lot with git. But I will try my best
@ncls. I struggle a lot with git. But I will try my best
can use codesandbox, etc; basically anything so that i can have access to a minimal reproduction version of the nextjs project
@joulev can use codesandbox, etc; basically anything so that i can have access to a minimal reproduction version of the nextjs project
ncls.OP
I found out that it is because of making the component a client component
correct, metadata only works in server components
ncls.OP
But it needs to be a client component because I need
useStateAnswer