Closed
Description
Description
Using a RectButton in a List component (FlatList/SectionList) will become unresponsive in certain scenarios. I am not sure whether this is an incorrect usage of this library or it's something new with RN. This wasn't an issue in production before.
- It's observed that the event handler is not called when it's unresponsive
It's observed that when RectButton is unresponsive, it's also unresponsive to swipe up to close the android app- It's observed that using the same example, it cannot be reproduced on Snack
- Finally, setting
shouldActivateOnStart=true
on RectButton seems to solve the issue - Additionally, I initially thought it's because I'm not using RectButton inside RNGH's ScrollView so I've added a SectionList export via
patch-package
. This also seems to solve the issue other than settingshouldActivateOnStart=true
.
Platforms
- iOS
- Android
- Web
Screenshots
Screen.Recording.2022-08-09.at.4.56.25.pm.mov
Screen.Recording.2022-08-09.at.4.57.14.pm.mov
Steps To Reproduce
Using RN's SectionList
- Scroll multiple times to the bottom of the list
- All instances become unresponsive
- Navigate to "Solution" by pressing the button in Header
- All instances are still responsive (however the ripple effect is gone)
- Exit and reload the app and navigate straight to "Solution" and repeat Step 1
- Everything works fine
Using re-exported SectionList by overriding its ScrollViewComponent with RNGH's ScrollView via renderScrollComponent
- Apply the package by running
yarn patch-package
- Scroll multiple times to the bottom of the list
- Everything works fine
Expected behavior
- RectButton does not become unresponsive when used within a List component on Android
Actual behavior
- RectButton becomes unresponsive when used within a List component Android
Snack or minimal code example
https://github.com/nujhong/RNGH-RectButton-In-a-List
Package versions
- React:
18.0.0
- React Native:
0.69.1
- React Native Gesture Handler:
2.5.0
- React Native Reanimated:
2.9.1