What is bounded height in ScrollView?

1.2k Views Asked by At

What does it mean? (https://facebook.github.io/react-native/docs/scrollview)

Keep in mind that ScrollViews must have a bounded height in order to work

Who has to have so called bounded height? ScrollView itself? or its very parent? Or its child?

<SafeAreaView style={{height: ...}}> <= this?
    <ScrollView style={{height: ...}}> <= this?
        <View style={{height: ...}}> <= this?
            ....
        </View>
    </ScrollView>
</SafeAreaView>
1

There are 1 best solutions below

0
On

As far as i know its height of parent of ScrollView.

<SafeAreaView style={styles.container}>
  <ScrollView style={styles.scrollView}>
     ......
     ......
  </ScrollView>
</SafeAreaView>

const styles = StyleSheet.create({
     container: {
       flex: 1,
     },