Closed giovanni-caiazzo closed 1 month ago
@cortinico I did some debugging and found that this issue is getting reproduced with useNativeDriver
enabled. When native driver is enabled this listener is not getting called.
Further debugging showed that for some reason on NativeAnimatedModule
all the batched operations are not getting executed. Due to this the addOperation for attaching listener on native animated value is never executed.
I am super excited to fix this but due to my limited knowledge of Animated node working I would need some guidance to move ahead.
Description
As discovered in here, when using the
SectionList
component in a New Architecture React Native app together with a component that usesAnimated
, like some components ofreact-native-paper
, thestickySectionHeadersEnabled
doesn't seem to work. The linked github discussion has a video of the bug occurring.Steps to reproduce
SectionList
stickySectionHeadersEnabled
is not workingAnimated
usage inApp.tsx
SectionList
stickySectionHeadersEnabled
now worksReact Native Version
0.74.2
Affected Platforms
Runtime - Android
Areas
Other (please specify)
Output of
npx react-native info
Stacktrace or Logs
Reproducer
https://github.com/giovanni-caiazzo/rn-sectionlist-reproducer
Screenshots and Videos
I first raised the issue in
react-native-paper
repo here. It has a video showing the bug from a slightly different test-repo I did: https://github.com/callstack/react-native-paper/assets/52694654/31a211fd-801e-4585-b31b-470e10dbaa53