#Error with ThemeProvider from next-themes

11 messages · Page 1 of 1 (latest)

zinc juniper
#

Hello, I'm using the latest version of nextjs with typescript and tailwindcss, I'm trying to implement a light/dark mode to my project but I get an error in the “providers.tsx”. The import is done correctly but it has trouble with the {children}, I think it's a typing error with typescript or JSX.

Anyone knows the solution ? Thanks in advance

providers.tsx and layout.tsx in media ->

upbeat flumeBOT
#

🔎 This post has been indexed in our web forum and will be seen by search engines so other users can find it outside Discord

🕵️ Your user profile is private by default and won't be visible to users outside Discord, if you want to be visible in the web forum you can add the "Public Profile" role in id:customize

✅ You can mark a message as the answer for your post with Right click -> Apps -> Mark Solution
(if you don't see the option, try refreshing Discord with Ctrl + R)

final holly
lethal holly
#

Weird, I also have the latest Next.js version (also latest on TailwindCSS and next-themes) and i tried with your code and it works

#

Unless you're talking about latest canary version, i have the latest stable: v.15.1.5

final holly
final holly
#

@zinc juniper ?

zinc juniper
zinc juniper