The Animated API
React and React VR make this easy as the animation API has a number of animation types that make this straightforward, without having to do math or have key frames, as you would with traditional animation. Instead of keyframing, you can ramp up things slowly, bounce, and pause declaratively. These props are spring, decay, and timing; more detail on these is in the online documentation at http://bit.ly/ReactAnims.
It's fine to animate, but we need to know where we are going. To do this, the Animation API has two value types: value for scalar (single values), and ValueXY for vectors. You might wonder why in this case a vector is only X and Y—ValueXY is intended for UI elements, that by their nature, are flat. If you need to ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access