Skip to content

[Animated] animated.timing start() callback not working #17875

@nthgol

Description

@nthgol

Is this a bug report?

Yes

Have you read the Contributing Guidelines?

Yes

Environment

Expo project

Environment:
OS: Windows 10
Node: 6.12.3
Yarn: 1.3.2
npm: 3.10.10
Watchman: Not Found
Xcode: N/A
Android Studio: Version 2.3.0.0 AI-162.4069837

Packages: (wanted => installed)
react: 16.2.0 => 16.2.0
react-native: https://github.com/expo/react-native/archive/sdk-25.0.0.tar.gz => 0.52.0

Target Platform: iOS (11)

Steps to Reproduce

(Write your steps here:)

  1. Swipe the top card either to the left or right appreciably
  2. Past a certain swipe distance, the card will fly off the page.
  3. This should invoke .start(() => this.onSwipeComplete(direction)), however, it does not. Passing in a regular function call works, but the function is called immediately, not on finishing of animation.timing.
    [e.g. .start( this.onSwipeComplete(direction)) ]

Expected Behavior

I expect a callback to be invoked in Animation.timing().start()

Actual Behavior

Nothing is invoked. I can also try console logging as a callback , and that does not work

Reproducible Demo

https://github.com/nthgol/swipe
Expo app

(Paste the link to an example project and exact instructions to reproduce the issue.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions