creativetimofficial / material-tailwind

@material-tailwind is an easy-to-use components library for Tailwind CSS and Material Design.
https://material-tailwind.com/
MIT License
3.88k stars 324 forks source link

Nextjs 13 #517

Open sardorb3k opened 11 months ago

sardorb3k commented 11 months ago

node_modules\@material-tailwind\react\context\theme.js (1:1775) @ _index

image

layout.ts image

RogerRossellZego commented 11 months ago

layout.ts is a server component, cannot be set as client.

You can create a components/index.ts:

"use client";

import { ThemeProvider } from "@material-tailwind/react"; 

export { ThemeProvider };

and in layout.ts you import the ThemeProvider from @/components/.

You can do the same with other components.

JefferyHus commented 9 months ago

I did follow the docs properly about Nextjs 13, and still getting that same error

shubhamgurav557 commented 8 months ago

Facing same error on my end as well

Amitabh1989 commented 1 month ago

Hi, has there been any update on this since? I am facing the same and unable to get through. My complete theme is lost and no matter what I do now, going back to my last commit, it is the same basically. Can not make it work.