Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add use client directive #273

Open
chandlervdw opened this issue Jul 28, 2023 · 2 comments
Open

Add use client directive #273

chandlervdw opened this issue Jul 28, 2023 · 2 comments

Comments

@chandlervdw
Copy link

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

I'm attempting to use this in a NextJS 13 app using the App Router, which defaults to React Server Components. Thusly, client-side components must be specified. This change would be 100% backwards compatible.

@r1chm8
Copy link

r1chm8 commented Aug 1, 2023

I'm also experiencing the same issue, from what I can see it's not possble to use this package in the nextjs app directory without this change.

@arthursimas1
Copy link

i've opened PR #281 to support Next.js routing system. which adapter are you using?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants