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

[DOCS]: Help migrating to v2 #3205

Closed
elie222 opened this issue May 16, 2024 · 3 comments
Closed

[DOCS]: Help migrating to v2 #3205

elie222 opened this issue May 16, 2024 · 3 comments

Comments

@elie222
Copy link

elie222 commented May 16, 2024

Posting this here to help others that search for the issue.
You may see an error when moving to headlessui/react v2 as such as:

Error: Did you forget to passthrough the `ref` to the actual DOM node?

The fix for me was replacing as={<Fragment />} with as='div' as well as adding in some as='div' in places that didn't have it.

More changes that can help when moving to v2 available here:
elie222/inbox-zero@c763b42

@leonatajeff
Copy link

Adding on:

This was also outlined in the v2 release

Change default tags for ListboxOptions, ListboxOption, ComboboxOptions, ComboboxOption, and TabGroup components (#3109)

It could use more visibility in the docs though, it is a little buried

@razzeee
Copy link

razzeee commented May 17, 2024

Our whole test suite starts failing with v2, I'm guessing, that stuff like roles only get backfilled after some time and our tests don't wait for that right now?

@adamwathan
Copy link
Member

Hey! I've moved this change to the top of the upgrade guide to make it a little easier to notice 👍

Basically a bunch of things that used to render div elements now render a Fragment, so if you were expecting the <Transition> for example to render a div, you'll need to add as="div" to get things working as expected again.

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

4 participants