I've been working on a React Native project for about six months. Despite this time, I'm continuously learning and encountering new challenges, underscoring that there's always more to master
One problem I encountered was a bug in the react-native-collapsible-tab-view
package, specifically related to callback props like onScroll
, onScrollEndDrag
, among others
Initially I tried to extract the nativeEvent
from onScrollEndDrag inside <Tabs.ScrollView onScrollEndDrag={callback} />
but it return nothing and I tried everything but I didn't seem to work.
Solution
Finally, I decided to assign an empty function () => {}
to onScroll
. After this adjustment, other callbacks inside <Tabs.ScrollView />
started to return nativeEvent as expected and functioned properly.
I haven't delved into the source code to pinpoint the exact cause, but for those encountering the same issue, I hope my experience can offer some guidance. Thank you for reading
Top comments (0)