react-native-animatable icon indicating copy to clipboard operation
react-native-animatable copied to clipboard

Setting "duration" prop as string plays animation

Open virgil9306 opened this issue 6 years ago • 2 comments

Setting the "duration" prop as an int works for, say, 300ms. When setting it as a string (e.g. '300') it finishes animation within 300ms and then immediately reverses it. For example:

<Animatable.View
                animation={STYLE_CONSTANTS.animations.fadeInUp}
                style={styles.buttonHolder}
                duration={STYLE_CONSTANTS.animations.duration}
                direction={'normal'}
>

Setting "duration" here as 300 works as intended, but '300' works for 300ms and then reverses the animation.

Perhaps setting some kind of warning for users who mistakenly put a string instead of int is ideal?

virgil9306 avatar Aug 27 '19 14:08 virgil9306

I've the same problem...

CarlosHLavezo avatar Feb 11 '20 14:02 CarlosHLavezo

Use a number instead of a string.

2020年2月11日(火) 23:55 Carlos H. Lavezo [email protected]:

I'm the same problem...

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/oblador/react-native-animatable/issues/281?email_source=notifications&email_token=AENEAGR3IE4GAR77MUUDMGDRCK34RA5CNFSM4IQFPBHKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOELMWY2Y#issuecomment-584674411, or unsubscribe https://github.com/notifications/unsubscribe-auth/AENEAGT36BNKIGNAUEEVYXDRCK34RANCNFSM4IQFPBHA .

virgil9306 avatar Feb 11 '20 15:02 virgil9306