Animated - start animation callback is called immediately
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- C++
- Star
- 127k
- Fork
- 25.3k
- Merge trung bình
- 1 ngày 23 giờ
- Pull request đã merge (30 ngày)
- 4
Mô tả
Description
When i call the "start()" method of Animated.timing the callback inside it is called immediately and not when the animation finish.
This is the code:
Animated.timing(positionY, {
toValue: 100,
duration: 500,
useNativeDriver: false,
}).start(() => {
hideMessage()
})
Steps to reproduce
I tried to reproduce the error on Expo online but on that playground the code works as expected. I also uploaded the video of the issue
React Native Version
0.73.5
Affected Platforms
Runtime - Android, Runtime - iOS
Output of npx react-native info
System:
OS: macOS 14.3.1
CPU: (12) x64 Apple M3 Pro
Memory: 98.03 MB / 18.00 GB
Shell:
version: "5.9"
path: /bin/zsh
Binaries:
Node:
version: 18.19.0
path: /usr/local/opt/node@18/bin/node
Yarn:
version: 1.22.21
path: /usr/local/bin/yarn
npm:
version: 10.2.3
path: /usr/local/opt/node@18/bin/npm
Watchman: Not Found
Managers:
CocoaPods:
version: 1.14.3
path: /opt/homebrew/bin/pod
SDKs:
iOS SDK:
Platforms:
- DriverKit 23.2
- iOS 17.2
- macOS 14.2
- tvOS 17.2
- visionOS 1.0
- watchOS 10.2
Android SDK: Not Found
IDEs:
Android Studio: 2023.1 AI-231.9392.1.2311.11330709
Xcode:
version: 15.2/15C500b
path: /usr/bin/xcodebuild
Languages:
Java:
version: 17.0.9
path: /usr/bin/javac
Ruby:
version: 2.6.10
path: /usr/bin/ruby
npmPackages:
"@react-native-community/cli": Not Found
react:
installed: 18.2.0
wanted: 18.2.0
react-native:
installed: 0.73.4
wanted: 0.73.4
react-native-macos: Not Found
npmGlobalPackages:
"*react-native*": Not Found
Android:
hermesEnabled: true
newArchEnabled: false
iOS:
hermesEnabled: true
newArchEnabled: false
Stacktrace or Logs
My bug is not a crash.
Reproducer
https://snack.expo.dev/9vyz9rIza-lsKdo3usD2v
Screenshots and Videos
https://github.com/facebook/react-native/assets/15747776/3c4fa16c-9b8d-4697-8d56-0879c57597b2
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Start with the Animated.timing().start() call in the provided reproducer and compare its behavior with the linked Expo Snack, where the callback reportedly works as expected. Reproduce the report on React Native 0.73.4/0.73.5 for Android and iOS, then verify that the callback runs only after the animation finishes.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- react-native
- Lĩnh vực
- mobile-dev
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 25/100