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.51k stars 307 forks source link

Nextjs 13 #517

Open sardorb3k opened 7 months ago

sardorb3k commented 7 months ago

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

image

layout.ts image

RogerRossellZego commented 6 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 4 months ago

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

shubhamgurav557 commented 3 months ago

Facing same error on my end as well