-
Notifications
You must be signed in to change notification settings - Fork 25.1k
Description
Description
On ending scrolling, onUserDrivenAnimationEnded is triggered on every Animated.View, which causes them all to re-render. On apps with more complex views such as ours, that results in 200+ re-renders that are not useful, and the mqtjs thread is 100% full, which makes the app fully unresponsive while those re-renders are happening.
If I comment this line out, the app is performant again, but ofcourse this line is there for a reason, so I don't know which bugs I am now inviting to the app. What is the proper fix? Or can we somehow prevent most of the views from re-rendering through some logic?
Related: #36504 (comment)
Steps to reproduce
- Run the snack.
- Scroll a bit, then try to tap any of the squares.
- See that this either is very delayed, or doesn't happen at all.
- In profiling, see that all components re-render.
Note: this is much, much more pronounced on Android.
Notes on the Snack:
- If you remove the Animated.Event from the animated scroll view, the problem disappears.
- If you remove the
scaleAanimation, which is there as an example animation, the problem disappears. - TouchableOpacity is just there to have a pressable Animated.View; the problem also happens if these are plain Animated.View.
React Native Version
0.80.2
Affected Platforms
Runtime - Android, Runtime - iOS, Build - MacOS
Areas
Fabric - The New Renderer
Output of npx @react-native-community/cli info
System:
OS: macOS 14.4.1
CPU: (16) x64 Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz
Memory: 1.73 GB / 32.00 GB
Shell:
version: 3.7.1
path: /usr/local/bin/fish
Binaries:
Node:
version: 20.13.1
path: /usr/local/bin/node
Yarn:
version: 1.22.22
path: /usr/local/bin/yarn
npm:
version: 10.5.2
path: /usr/local/bin/npm
Watchman:
version: 2025.06.23.00
path: /usr/local/bin/watchman
Managers:
CocoaPods:
version: 1.14.3
path: /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms:
- DriverKit 23.4
- iOS 17.4
- macOS 14.4
- tvOS 17.4
- visionOS 1.1
- watchOS 10.4
Android SDK: Not Found
IDEs:
Android Studio: 2023.3 AI-233.14808.21.2331.11842104
Xcode:
version: 15.3/15E204a
path: /usr/bin/xcodebuild
Languages:
Java:
version: 17.0.11
path: /usr/bin/javac
Ruby:
version: 2.6.10
path: /usr/bin/ruby
npmPackages:
"@react-native-community/cli":
installed: 19.1.1
wanted: 19.1.1
react:
installed: 19.1.0
wanted: 19.1.0
react-native:
installed: 0.80.2
wanted: 0.80.2
react-native-macos: Not Found
npmGlobalPackages:
"*react-native*": Not Found
Android:
hermesEnabled: true
newArchEnabled: true
iOS:
hermesEnabled: true
newArchEnabled: true
Stacktrace or Logs
See description!
MANDATORY Reproducer
https://snack.expo.dev/@tomvankruijsbergen/rn-animatedvalue
Screenshots and Videos
No response