You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
【Android】:Animated.event does not update latest contentOffset.y on onScroll Event When useNativeDriver is set to true #52657
I want to implement a stickyHeader component that relies on the scroll event of the scrollView to get the latest contentOffset.y. Then, by listening to the changes in y, I can set the translateY property of the stickyHeader.
However, when the content height of the scrollView changes dynamically, especially when it decreases, using addListener to track the animation value changes, we find that when useNativeDriver is set to true, Animated.event sometimes fails to update the latest contentOffset.y value. The listener callback of Animated.event prints e.nativeEvent.contentOffset.y as the latest value, but printing animatedValue.__getValue still shows the previous value.
Unfortunately, we cannot trigger the animation value change in the listener callback of Animated.event, as that would cause the sticky animation to flicker.
Steps to reproduce
Install the app.
Click on tab1 and scroll the scroll-view content to the bottom.
Click on tab2.
Repeat steps 2 and 3 to reproduce the issue.
I cannot reproduce the issue in the emulator; it only occurs sporadically on a real device.
this appears to be related to New Architecture. The issue occurs on Android where newArchEnabled: true, but I haven't tested extensively on the old architecture yet.
This issue is stale because it has been open for 180 days with no activity. It will be closed in 7 days unless you comment on it or remove the "Stale" label.
Activity
cortinico commentedon Jul 17, 2025
Is this a New Architecture regression?
yandadaFreedom commentedon Jul 17, 2025
this appears to be related to New Architecture. The issue occurs on Android where newArchEnabled: true, but I haven't tested extensively on the old architecture yet.
Sameed1998 commentedon Jul 18, 2025
Have you fixed this issue?
yandadaFreedom commentedon Jul 21, 2025
No, I don't know how to fix it 😂
react-native-bot commentedon Jan 17, 2026
This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days.
react-native-bot commentedon Jan 17, 2026
This issue is stale because it has been open for 180 days with no activity. It will be closed in 7 days unless you comment on it or remove the "Stale" label.
yandadaFreedom commentedon Mar 18, 2026
up
react-native-bot commentedon Sep 15, 2026
This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days.