beginner here, i'm having trouble understanding interpolation with usespring in React spring library , im trying to make an element go back and forth with the translate css property, now what i do understand is that passing in a range emulates css key frames and the output is the values the element should have at that point of the animation so i did something like,
const {xyz} = useSpring({
from: {xyz: [0, 0, 0]},
to: {xyz: [0, 200, 0]},
})
<animated.div className={classes.down} style={{
transform: xyz
.interpolate(([y]) => (
{range: [0, 0.25, 0.35, 0.45, 0.55, 0.65, 0.75, 1],
output: [180, 220, 180, 220, 180, 220, 180, 200]}
))
.interpolate((x, y, z)=> translate(${x}px, ${y}px, ${z}px))
}}>
<Typography variant="body2" className={classes.downText}>
Scroll Down
</Typography>
<DownArrow className={classes.downIcon}/>
</animated.div>
which dosen't work