Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spring animation with delay #12474

Closed
henrikra opened this issue Feb 20, 2017 · 1 comment
Closed

Spring animation with delay #12474

henrikra opened this issue Feb 20, 2017 · 1 comment
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@henrikra
Copy link

Description

When using spring animation with delay the delay is not registered at all. Here is how to use delay

Animated.spring(
  this.state.rotaneAnimation, 
  {toValue: 360, delay: 500},
).start();

But for example with timing is works:

Animated.timing(
  this.state.rotaneAnimation, 
  {toValue: 360, delay: 500},
).start();

Solution

I think the solution lies here: https://github.com/facebook/react-native/blob/master/Libraries/Animated/src/AnimatedImplementation.js#L447 because it looks like the spring does not take delay as parameter

Additional Information

  • React Native version: 0.40.0
  • Platform: both
  • Operating System: MacOS
@brentvatne
Copy link
Collaborator

Indeed spring does not support this, you can use Animated.delay if you like, it is more composable than an option.

@facebook facebook locked as resolved and limited conversation to collaborators May 24, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

3 participants