Add `use client` directive
chandlervdw opened this issue · comments
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.
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.
i've opened PR #281 to support Next.js routing system. which adapter are you using?