Closed RobinMalfait closed 1 week ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
headlessui-react | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Jun 19, 2024 9:41pm |
headlessui-vue | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Jun 19, 2024 9:41pm |
This PR is mainly a refactor to implement the
<Transition />
and<TransitionChild />
components on top of the data attribute implementation. The big difference is that there is no direct DOM mutation anymore, but just applying data attributes to the underlying element.This also means that the
<Transition />
anduseTransitionData()
don't have 2 separate paths for controlling the transition, but there is only a single source of truth.This PR also renames the
useTransitionData()
touseTransition()
and removed the originaluseTransition()
.Because of the refactor and not relying on direct DOM mutations we can use React to declaratively provide the correct state instead of doing it imperatively by mutating directly. Which in turn fixes an issue: #3277
From an API perspective nothing changes, it's purely an internal refactor.
Fixes: #3277