moshest / next-client-cookies

SSR and client support for cookies in Next.js 13 (app directory)
MIT License
144 stars 9 forks source link

'CookiesProvider' cannot be used as a JSX component. Next 15 #24

Closed Fouadktb closed 1 week ago

Fouadktb commented 1 week ago

as the Title implies, getting type error,

'CookiesProvider' cannot be used as a JSX component. Its type '({ children, }: { children: ReactNode; }) => Promise<ReactElement<any, string | JSXElementConstructor<any>>>' is not a valid JSX element type.

moshest commented 1 week ago

Please check the demo folder, it seems that you created a client component on layout instead of a server component.