Add to your JavaScript knowledge of shortcuts by mastering the ternary operator, so you can write cleaner code that your fellow developers will love.
Learn how to efficiently bundle your TypeScript package with tsup. This guide covers setup, custom output extensions, and best practices for optimized, production-ready builds.
Learn the fundamentals of React’s high-order components and play with some code samples to help you understand how it works.
Learn about the dependency inversion principle (DIP), its importance, and how to implement it across multiple programming languages.
9 Replies to "Common bugs in React Native ScrollView and how to fix them"
in the example code, the height attribute on the scroll container does not work
Hey there- you’re right, thank you for pointing that out – in order to have a specific height on a ScrollIView component we have to wrap it up in View wrapper and set the height there.
Do you know what happens with a flex layout inside scroll view?
I am trying to configure table grid layout in react native which could be scrollable horizontally and vertically:
https://stackoverflow.com/questions/65626761/horizontally-and-vertically-scrollable-layout-in-react-native
The problem is that once I add a scroll view, flex:1 stops working
Doing complex grid layouts in React Native is a little bit tricky so you’d be better off using some kind of 3rd party library like https://github.com/saleel/react-native-super-grid.
thank you so much for the explanation, especially the difference between “style” and “contentContainerStyle”, which was the part that helps me to fix my problem.
I’m really glad that I could help you!
Hello. Thanks for sharing your knowledge.
In Android it seems that paddingBottom and marginBottom do not work correctly, you have to set paddingBottom on contentContainerStyle to give a little space at the bottom of the ScrollView. Is it a correct behavior or is there a bug?
Hello, Yes this is a correct behaviour, in my current experience ScrollView is the one component that has the highest amount of differences on Android vs iOS.
I am facing problem in nested horizontal scrolling
its not working using nestedScrollEnabled={true}