GeekyAnts / GeekyAnts/NativeBase
Slider breaks InteractionManager runAfterInteractions, SectionList, and probably other important components
- Dominant language
- TypeScript
- Stars
- 20.4k
- Forks
- 2.4k
- PR merge metrics
- No merged PRs in 30d
Description
### Description
NativeBase slider breaks InteractionManager.runAfterInteractions and likely FlatList, SectionList, etc.
### CodeSandbox/Snack link
https://snack.expo.dev/@heyalexchoi/native-base-slider-bug-snack
### Steps to reproduce
1. Open my Expo Snack example in the link. Run on iOS device.
2. Press the button. Watch console logs and counts increment.
3. Use the slider.
4. Press button again. Notice that the `runAfterInteractions` block no longer executes.
### NativeBase Version
3.4.23
### Platform
- [ ] Android
- [ ] CRA
- [ ] Expo
- [X] iOS
- [ ] Next
### Other Platform
_No response_
### Additional Information
PanResponder should clear interaction handle like this:
`InteractionManager.clearInteractionHandle(this._panResponder.getInteractionHandle());`
https://github.com/facebook/react-native/issues/8624
NativeBase SliderThumb relies on `import { useSliderThumb } from '@react-native-aria/slider';`
https://github.com/GeekyAnts/NativeBase/blob/master/src/components/primitives/Slider/SliderThumb.tsx
`useSliderThumb` uses `useMove`
Which is where I believe the interaction handle needs to be cleared.
https://github.com/gluestack/react-native-aria/blob/main/packages/slider/src/useMove.ts
https://github.com/gluestack/react-native-aria/blob/main/packages/slider/src/useSliderThumb.ts
This bug is likely manifesting in lots of other bug reports and undesired behavior - such as FlatLists, SectionLists, etc not rendering items properly.
Contributor guide
Assessment
This issue has not been assessed yet.