Skip to content

<RectButton> becomes unresponsive when used within a List #2160

Closed
@nujhong

Description

@nujhong

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 setting shouldActivateOnStart=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

  1. Scroll multiple times to the bottom of the list
  2. All instances become unresponsive
  3. Navigate to "Solution" by pressing the button in Header
  4. All instances are still responsive (however the ripple effect is gone)
  5. Exit and reload the app and navigate straight to "Solution" and repeat Step 1
  6. Everything works fine

Using re-exported SectionList by overriding its ScrollViewComponent with RNGH's ScrollView via renderScrollComponent

  1. Apply the package by running yarn patch-package
  2. Scroll multiple times to the bottom of the list
  3. 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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions