O'Reilly logo

React Native By Example by Richard Kho

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

ScrollView

By default, the return key on the software keyboard handles a dismiss action for our apps. However, a return key does not exist on a numeric keyboard. Instead, we can replace our top-level View with the ScrollView component.

The ScrollView component wraps around the rest of your component, providing scrolling capabilities.

An important thing to know is that ScrollView requires all its children to have a height property in its styling. If it does not have one, then the child element will not render.

Let's quickly replace the View that AddExpensesModal encapsulates around its Modal component with a ScrollView.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required