Skip to content

Instantly share code, notes, and snippets.

@FarazPatankar
Last active April 30, 2020 00:54
Show Gist options
  • Save FarazPatankar/f8f602c3831d1d5dc1957575505a5674 to your computer and use it in GitHub Desktop.
Save FarazPatankar/f8f602c3831d1d5dc1957575505a5674 to your computer and use it in GitHub Desktop.
Setting up the keyboard avoiding view in React Native
import { KeyboardAvoidingView } from 'react-native';
// Based on the behavior you need, you might have to update the prop accordingly.
// https://docs.expo.io/versions/latest/react-native/keyboardavoidingview/#behavior
<KeyboardAvoidingView behavior="padding">
// Existing UI code
</KeyboardAvoidingView>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment