Search code examples
react-nativescrollview

ScrollView not show content React-native


I'm building an application using react-native was all right until I needed to add ScrollView, no matter what screen I add and the content stops being rendered, no error is displayed, whatever is occurring is silent, I've tried Several things I saw on the internet but nothing solved my problem, I put an example code below...

My code:

export default () => (
    <View style={{flex: 1}}>
        <ScrollView style={{flex: 1}}>

             // My page content here

        </ScrollView>    
    </View>
);

Apparently it's something simple but I did not find the solution, if anyone can help me thank you.


Solution

  • Try adding a height and width to the scroll view's style, and then work your way from there.

    Or

    make it absolute position and set the top, left, bottom and right position to 0 as such

    position: 'absolute',
    top: 0,
    left: 0,
    right: 0,
    bottom: 0