8

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>
Green
  • 28,742
  • 61
  • 158
  • 247
  • 1
    it means the inner view inside of the ScrollView should have a height of its own filled data! WRAP CONTENT – Rizwan Atta Jul 12 '18 at 10:54
  • @Rizwanatta, what does it mean _a height of its own_? – Green Jul 12 '18 at 10:59
  • ScrollView is a generic view that depends upon the height go the screen in which it is being rendered! and in ScrollView it takes only one Child Whose height should be wrapContent. – Rizwan Atta Jul 12 '18 at 11:48

1 Answers1

0

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,
     },