Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

React Native Tab View : displaying empty screen when Tabview element is wrapped / nested within View

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?

like image 424
Avisek Chakraborty Avatar asked Aug 12 '26 00:08

Avisek Chakraborty


1 Answers

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

like image 185
Hend El-Sahli Avatar answered Aug 14 '26 14:08

Hend El-Sahli



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!