enzomanuelmangano / pressto

Your React Native app deserves better tapping interactions.
MIT License
112 stars 0 forks source link

fix: add `renderScrollComponent` for improved scrolling with pressables #4

Closed enzomanuelmangano closed 2 weeks ago

enzomanuelmangano commented 2 weeks ago

This PR introduces renderScrollComponent, enhancing the scrolling experience when using pressable components inside scrollable views (e.g., ScrollView, FlatList, FlashList).

What it does

How to use it

import { renderScrollComponent } from 'pressto';

<FlatList
  renderScrollComponent={renderScrollComponent}
  data={data}
  renderItem={({ item }) => <PressableRotate style={styles.box} />}
/>

Implementation details

This approach allows for precise distinction between scrolling and tapping intentions, improving overall user experience.

https://github.com/user-attachments/assets/6c6c22fb-9a72-433c-b7c3-96ae443e5a52