how to set scrollview height in react native code example

Example 1: styling scrollview height in react native

<ScrollView contentContainerStyle={{ flexGrow: 1, height: '100%'}}>
  // Add scrollView to all Views on the interface, mainly on the ScrollView component
  // and height to 100% for the ScrollView component
</ScrollView>

Example 2: react native scrollview set height

render() {
    return (
      <View style={styles.container}>
        <View style={{height: 80}} >
          <ScrollView
            horizontal
            style={{ backgroundColor: 'blue'}}
          >
            <Text style={{padding: 24}} >title1</Text>
            <Text style={{padding: 24}} >title2</Text>
            <Text style={{padding: 24}} >title3</Text>
            <Text style={{padding: 24}} >title4</Text>
            <Text style={{padding: 24}} >title5</Text>
          </ScrollView>
        </View>
      </View>
    );
  }