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 "Can't perform a React state update on an unmounted component." when using the Transition component #2374

Merged
merged 2 commits into from Mar 16, 2023

Conversation

RobinMalfait
Copy link
Collaborator

This PR fixes a React warning:

Can't perform a React state update on an unmounted component.

This happened because we are calling setState when the component was already unmounted which
results in a no-op and a small/annoying warning. Luckily we don't have any subscriptions so there
were no memory leaks.

Fixes: #2373

@vercel
Copy link

vercel bot commented Mar 16, 2023

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

Name Status Preview Comments Updated
headlessui-react ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Mar 16, 2023 at 3:27PM (UTC)
headlessui-vue ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Mar 16, 2023 at 3:27PM (UTC)

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.

Demo Dialog component produces a no-op error on unmount
1 participant