Menu

Keyboard-aware forms in React Native and Expo, with a Save button that rides the keyboard
πŸ“°

Keyboard-aware forms in React Native and Expo, with a Save button that rides the keyboard

DEV Community: javascriptΒ·Saul ZaynΒ·16 days ago
#h7FiqzmD
#devtojavascript#devto#dev#keyboard#field
Long article (1309 words) β€” no AI summary yet.
Reading 0:00
15s threshold

Every React Native app with a form hits the same wall. You tap a field low on the screen, the keyboard

opens, and the field is gone behind it. The Save button too.

The usual fixes get you most of the way. KeyboardAvoidingView behaves differently on iOS and

Android. KeyboardAwareScrollView from

react-native-keyboard-controller

is much better, and it's what I build on. But once a real form screen has a footer button, a

previous / next toolbar, a modal sheet or a validation error, the edge cases start piling up.

I hit all of them while building a booking app, so I pulled the fix out into a small package:

@saulzayn/rn-keyboard-form .…

Continue reading β€” create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.