react native plugin for carousel together with native base tabs

Viewed 209

I am new in react-native.

Currently I am using RN 0.59,

I am using carousel https://github.com/archriss/react-native-snap-carousel then I have tabs using native base. https://docs.nativebase.io/Components.html#tabs-def-headref

This works fine on IOS but on android the swiping on the carousel doesn't work. So, I did a workaround for, I setup a state that will lock the tabs once the Component was press in.

On my page

<Carousel
 ...
 ...
 renderItem={(data, key) => {
    return (
        <View ...>
            <TouchableWithoutFeedback
               ...
               delayPressIn={0} 
               onPressIn={() => toggleTabLocked() } // this set to true or false the state
               >
               ...
            </TouchableWithoutFeedback>
        </View>
    );
}}>

on my tab component

<Tabs
    ...
    ...
    locked={tabLocked} // state from reducer
>
    ....
</Tabs>

This is a work around on my end. But the issue issue is, it is not that smooth in terms on transition and swiping.

Is there any workaround or suggestion for the plugin I am using?

Thanks!

0 Answers
Related