Open samislam opened 1 month ago
Hi, I was searching from where this warning was coming from. I've effectively bootstraped a new NextJS project with Shadcn and implemented the dark mode following the documentation. The warning is still present if I remove the "use client" directive.
i got same issues!!!
Describe the bug
The enabling dark-mode section in the documentation here shows the way to enable dark-mode by installing next-themes. and it says "create a new file with the name ThemeProvider and add the 'use client' directive there". Now there's no need for that because ThemeProvider from next-themes is already a client component.
Doing the method described in the docs causes the error:
Read the section of this in docs of next-themes here
They say:
Affected component/components
everything
How to reproduce
Do the exact same steps described in the docs here.
side note: stackbilitz may not show the error
Codesandbox/StackBlitz link
https://stackblitz.com/edit/next-themes-shadcnui?file=app%2Flayout.tsx
Logs