oblador / react-native-animatable

Standard set of easy to use animations and declarative transitions for React Native
MIT License
9.84k stars 702 forks source link

Variable Animation Amount #265

Open lightninglu10 opened 5 years ago

lightninglu10 commented 5 years ago

Hey guys, when we use .animate('CUSTOM_ANIMATION'), is there anyway to pass variables?

For example, if we have:

const CUSTOM_ANIMATION = {
  from: {
    opacity: .05,
    transform: [{translateY: 10}]
  },
  to: {
    opacity: 1,
    transform: [{translateY: 0}]
  }
}

can we have the translateY be variable? Or would we need to create different animations for each of those?

kevando commented 5 years ago

https://github.com/oblador/react-native-animatable/issues/123