1

I am using 'react-native-tab-view' library in my code. Link here: npm / github.

Here is a basic example code in snack- that can run on Web.

Now the issue is- if I want to display a Header text above <Tabview/> tag, it shows nothing. Even if I just wrap the <Tabview/> within a <View></View> like this below snippet, it shows an empty screen, even without any error.

<View>
  <TabView .... />   /*Shows empty screen*/
</View>

Here is an example code screenshot with output, from snack with nested <Tabview/>, running in Android device:

enter image description here

Kindly suggest how to achieve that. Not sure what am I missing?

Avisek Chakraborty
  • 8,229
  • 10
  • 48
  • 76

2 Answers2

2

In my case, the TabView was rendered inside a parent ScrollView ... removing the parent scroller resolved the issue.

Hend El-Sahli
  • 6,268
  • 2
  • 25
  • 42
1

I think you should have to use <View style={{flex:1}}> Tab code </View>