You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TypeError: createContext only works in Client Components. Add the "use client" directive at the top of the file to use it. Read more: https://nextjs.org/docs/messages/context-in-server-component
#3301
Open
DSXtreme opened this issue
Dec 24, 2024
· 2 comments
Expected behavior:
I have created a basic project and while using @emotion/react v11.14.0, i am facing issue of createContext only works in Client Components. This is occurring though i am using emotion/react at client side rendered component. which is acting like a wrapper component in layout.tsx of my project. while in the older version of @emotion/react it was working fine.
Environment information:
@emotion/react: ^11.14.0,
"next": "15.1.2",
"react": "^19.0.0",
"react-dom": "^19.0.0"
The text was updated successfully, but these errors were encountered:
Current behavior:
To reproduce:
Expected behavior:
I have created a basic project and while using @emotion/react v11.14.0, i am facing issue of createContext only works in Client Components. This is occurring though i am using emotion/react at client side rendered component. which is acting like a wrapper component in layout.tsx of my project. while in the older version of @emotion/react it was working fine.
Environment information:
The text was updated successfully, but these errors were encountered: