3 ms·
If you take the animation out of the DOM-level code and put it in the CSS, doesn't that fix the issue? React then does not need to know about or control the ani
by hellofunk 7y ago
If you take the animation out of the DOM-level code and put it in the CSS, doesn't that fix the issue? React then does not need to know about or control the animation and the browser just does what it does natively as things get added or removed from the DOM.
- WAHa_06x36 7y agoThat leaves you with very simple and bland animations, and very little flexibility.
- hellofunk 7y agoHm, have you seen some of the incredible and fine-tuned animations possible with all the CSS features for that? I think it's pretty amazing and relatively easy.
- edflsafoiewq 7y agoThis also requires that we have someone else who does animations for us, rather than doing all the UI ourselves.
- dsego 7y agoCSS animations are not enough for anything but simple transitions, since they are time based. Their behavior is also hard to control from JS. Check out this react animation library, which is based on springs for natural motion: react-spring.io (intro youtu.be/1tavDv5hXpo).