tailwindlabs / headlessui

Completely unstyled, fully accessible UI components, designed to integrate beautifully with Tailwind CSS.

Home Page:https://headlessui.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[DOCS]: Help migrating to v2

elie222 opened this issue · comments

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

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

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?