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

Fix double beforeEnter due to SSR #1183

Merged
merged 2 commits into from
Mar 2, 2022
Merged

Conversation

RobinMalfait
Copy link
Collaborator

Due to SSR and the hydration step, the transition code was already
called even if we were not ready yet. This caused an issue where the
beforeEnter callback got fired twice intead of once.

Fixes: #311

Due to SSR and the hydration step, the transition code was already
called even if we were not ready yet. This caused an issue where the
`beforeEnter` callback got fired twice intead of once.

Fixes: #311
@vercel
Copy link

vercel bot commented Mar 2, 2022

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployments, click below or on the icon next to each commit.

headlessui-react – ./packages/playground-react

🔍 Inspect: https://vercel.com/tailwindlabs/headlessui-react/GDGqqczrkmSKUV48FaqjQY1RHgeK
✅ Preview: https://headlessui-react-git-fix-double-before-enter-tailwindlabs.vercel.app

headlessui-vue – ./packages/playground-vue

🔍 Inspect: https://vercel.com/tailwindlabs/headlessui-vue/3BmR9soCVcKNSma85djr1edb73Vc
✅ Preview: https://headlessui-vue-git-fix-double-before-enter-tailwindlabs.vercel.app

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.

React Transition component fires beforeEnter callback twice under certain conditions
1 participant