'React Native tab view inside a scrollview

expo demo

I'm trying to use react-native-tab-view with scrollable content, but having the tabview start half way down a scrollable page like:

    <View style={{flex: 1}}>
      <ScrollView style={{flex: 1}}>
        <SomeContent />
        <TabView
            navigationState={{ index, routes }}
            renderScene={renderScene}
            onIndexChange={setIndex}
            initialLayout={initialLayout}
            style={{flex: 1}}
        />
      </ScrollView>
    </View>

However when I run this on ios nothing renders below the tabs. If I remove the top level scrollview then the whole thing will render but obviously only the tab itself is scrollable.

Any advice would be appreciated



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source