Interpolation usage docs #1637
-
🤓 QuestionIt looks like Could someone provide a usage here and maybe we can look into adding that into the docs? For example, how might one do this with the new API?
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
It's definitely documented in the docs under <animated.div
style={{
opacity: styles.opacity,
transform: styles.y.to((y) => `translateY(${y}px)`),
}}
> But you don't actually need to do that interpolation is |
Beta Was this translation helpful? Give feedback.
It's definitely documented in the docs under
interpolation
. It's simply renamed toto
so your code would be come:But you don't actually need to do that interpolation is
v9
ofreact-spring
you could simply pass they
prop to the styles object 👍🏼