Skip to content

NativeAnimated getValue returns incorrect result #9250

@rozele

Description

@rozele

Problem Description

When stopping animations on an animated value, you can supply a callback that provides the current value. Currently, this value always returns the initial value on the NativeAnimated module.

Steps To Reproduce

  1. Add example that stops an animation and shows the value supplied to the callback, e.g., in RNTester > Native Animated Example
  2. Run animation and force it to stop
  3. Observe that the value supplied to the stopAnimation callback is incorrect.

Expected Results

The value supplied to the stopAnimation callback should reflect the current state of the animation.

CLI version

npx react-native --version

Environment

npx react-native info

Target Platform Version

No response

Target Device(s)

No response

Visual Studio Version

No response

Build Configuration

No response

Snack, code example, screenshot, or link to a repository

2021-12-08.12-37-21.mp4

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions