React-native-animatable: boundaries of the animation

Created on 6 May 2017  路  3Comments  路  Source: oblador/react-native-animatable

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?

Most helpful comment

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} />

All 3 comments

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)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kamek-pf picture kamek-pf  路  8Comments

iamhaaamed picture iamhaaamed  路  3Comments

TrustDec picture TrustDec  路  3Comments

Aspirationtocode picture Aspirationtocode  路  7Comments

julesmoretti picture julesmoretti  路  7Comments