react-native-animatable
react-native-animatable copied to clipboard
boundaries of the animation
i am using Animatable.View with the following properties animation="slideInDown" iterationCount={'infinite'} direction="alternate"
i need to set the boundaries of the animation, the view is translating very far from the end point, how can i set from and to values?
any suggestions?
Hi, you define your own animation with predefined boundaries like this:
const SLIDE_IN_DOWN_KEYFRAMES = {
from: { translateY: -50 },
to: { translateY: 0 },
};
<Animatable.View animation={SLIDE_IN_DOWN_KEYFRAMES} />
I think it might me useful to include this in looping section of readme :)
Hi @oblador,
I like the answer you gave when predefining boundaries, but how can you use this when using refs?
From what I know, it looks something like this this.animatableView.slideOutUp(300)