question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Transition with unmount

See original GitHub issue

What package within Headless UI are you using?

@headlessui/react

What version of that package are you using?

v1.6.4

What browser are you using?

Chrome

Reproduction URL

sandbox: codesandbox.io/s/objective-noether-9qi5ri?file=/src/App.js

Describe your issue

Transition component with unmount prop does not play animation when called from a completely inactive state as expected, but if another animation is played in parallel - it works fine

https://www.screencast.com/t/9R5UjHcJaK7K

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:8
  • Comments:11

github_iconTop GitHub Comments

1reaction
RobinMalfaitcommented, Sep 2, 2022

After refreshing my browser a lot of times, I could reproduce it about 1-2% of the time in Chrome and was still very random. Could not reproduce it in Safari at all, I could reproduce it in Firefox pretty consistently.

But I think I found a solution here #1811

@ARkrOSClou can you install the latest insiders version and see if that works on your machine now?

0reactions
RobinMalfaitcommented, Sep 2, 2022

Perfect, I’m really happy to read this. In a previous version we did some important updates to Transition, but this particular bug was related to the unmount={false} directly.

Glad it’s fixed now! Thank you for testing.

Read more comments on GitHub >

github_iconTop Results From Across the Web

React - animate mount and unmount of a single component
I think using Transition from react-transition-group is probably the easiest way to track mounting/unmounting. It is incredibly flexible.
Read more >
Animating unMount in React with CSS3 transitions - Medium
The problem with animating react components with css3 transitions is that react with unMount your component before the animation is done.
Read more >
Super easy react mount/unmount animations with hooks
As soon as the animation finishes, unmount the component. I want to show you the simplest way to accomplish this using pure CSS...
Read more >
React Showtime: Mount and Unmount with CSS Transitions
It automatically handles mounting and unmounting to allow time for transitions to occur. See the Github repository here: ...
Read more >
How to animate mount and unmount of a react component ...
In this video we add animations to the mount and unmount events of a react component using the react-spring animation library and hooks, ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found