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 client-only to mark everything as client components #1981

Merged

Conversation

RobinMalfait
Copy link
Collaborator

@RobinMalfait RobinMalfait commented Nov 3, 2022

This should improve the error messages when using Headless UI in a Next.js 13+ repo instead of getting a cryptic error message that createContext doesn't exist.

This should improve the error messages when using Headless UI in a
Next.js 13+ repo instead of getting a cryptic error message that
`createContext` doesn't exist.
@vercel
Copy link

vercel bot commented Nov 3, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
headlessui-react ✅ Ready (Inspect) Visit Preview Nov 3, 2022 at 3:17PM (UTC)
headlessui-vue ✅ Ready (Inspect) Visit Preview Nov 3, 2022 at 3:17PM (UTC)

@tonypizzicato
Copy link

After this change headlessui doesn't work with nextjs 12 + ssr.
is it really should be client-only instead of use client?

@RobinMalfait
Copy link
Collaborator Author

I only see your comment now @tonypizzicato, the error should already occur when using Headless UI components in non-client only components (aka Server Components) without the client-only package installed, this just improves the error message.

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

Successfully merging this pull request may close these issues.

None yet

2 participants