Grokking React Native
Vote

0% completed

​

Interpolating Animated Values

A thermometer with Celsius and Fahrenheit scales shows one reading in two units. The mercury has only one height, and each scale converts that height into its own number.

An animated value can work the same way. The box has one number, how far it has moved, and each style can convert that number into its own range. Converting a value from one range to another in this way is called interpolation. It lets one value drive several styles, so they all change together without extra animations.

One Value, Two Styles

The interpolate method takes two lists of the same length. `inputRange

.....

.....

.....

Like the course? Get enrolled and start learning!

Reading Progress

0%


Vote for new content