material-tailwind icon indicating copy to clipboard operation
material-tailwind copied to clipboard

Nextjs 13

Open sardorb3k opened this issue 2 years ago • 4 comments

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

image

layout.ts image

sardorb3k avatar Dec 01 '23 19:12 sardorb3k

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.

RogerRossellZego avatar Dec 07 '23 16:12 RogerRossellZego

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

JefferyHus avatar Feb 19 '24 00:02 JefferyHus

Facing same error on my end as well

shubhamgurav557 avatar Mar 07 '24 11:03 shubhamgurav557