O'Reilly logo

Mastering React by Ryan Vice, Adam Horton

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Summary

Animation on the web exists in a few fundamental forms that mostly involve changing out CSS classes, directly manipulating the style attribute, or a combination of the two. There's more sophistication and flexibility to discover when using the lower level ReactTransitionGroup interface, but the ReactCSSTransitionGroup mechanism, simple class swapping, or React-Motion will get you just about anywhere you need to be. There are also loads of other great examples on the React-Motion GitHub page (https://github.com/chenglou/react-motion), such as animated list reordering and follow the leader style cursor animation. They are definitely worth checking out.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required