sghall / react-move

React Move | Beautiful, data-driven animations for React
https://react-move-docs.netlify.app
MIT License
6.58k stars 168 forks source link

How to render animations with multiple stages #70

Closed geohuz closed 3 years ago

geohuz commented 3 years ago

Maybe this is a dumb question, I'm wondering how to transit color like react-spring:

const multiAnimation = useSpring({
    from: { opacity: 0, color: 'red' },
    to: [
        { opacity: 1, color: '#ffaaee' },
        { opacity: 1, color: 'red' },
        { opacity: .5, color: '#008000' },
        { opacity: .8, color: 'black' }
    ]
  });

I can't find a way to do this in react-move

geohuz commented 3 years ago

I found the "interpolation" explaination in documention and that solved my problem.