Enable Scroll in a React Native ScrollView Based on the Content Size
1 min readApr 26, 2018
Ever have the situation where you sometimes had content that was shorter than the screen size and didn’t require scrolling but occasionally had content taller than the screen size, thus necessitating scroll to allow the user to see all the content?
If that’s your case you can leverage the onContentSizeChange
prop of a ScrollView
and check whether the content height is taller than the screen size.
Here’s what I mean…
Here’s a video walkthrough as well
Interested in learning more about React Native? Join my email list!