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.

Removing styles after transition completes

See original GitHub issue

I’m using react motion for view transitions and I’m running into problems where the styling needed for my transitions (a mix of transform and opacity) interferes with my child component styling and after the transitions there’s really no use for the transitions styles anyway, so I would like to remove them after the animation has completed.

Is there a good pattern for that currently? Something simmilar to [clearprops](http://greensock.com/docs/#/HTML5/GSAP/Plugins/CSSPlugin/) in GSAP would be ideal. Is it possible?

Issue Analytics

  • State:open
  • Created 8 years ago
  • Comments:9 (1 by maintainers)

github_iconTop GitHub Comments

24reactions
jagreenecommented, Mar 22, 2016

👍 I would also love to see onRest() available in TransitionMotion

1reaction
oliveroxcommented, Feb 1, 2017

I need the onRest() callback to be available with StaggeredMotion. Any plans on when this would be available? Or is there any way to make it happen now?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Removing styles after enter transition · Issue #173 - GitHub
I'm using Transition to animate the appearance of some items in a list. Amongst other properties, I'm animating opacity from 0 to 0.9...
Read more >
Remove/Hide div from DOM after animation completes using ...
Use the animation-fill-mode option. Set it to forwards and the animation ends at it's final state and stay like that.
Read more >
Animation Techniques for Adding and Removing Items From a ...
Animating elements with CSS can either be quite easy or quite difficult depending on what you are trying to do.
Read more >
Using CSS transitions - CSS: Cascading Style Sheets | MDN
CSS transitions provide a way to control animation speed when changing CSS properties. Instead of having property changes take effect ...
Read more >
How to Linearly Transition the removal of a DOM element ...
For a particular HTML/DOM element, our job is to remove it and add a transition to the process of removal. Eventually, as soon...
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