Form

Having considered the options, I have decided to use formik; was an especially easy decision as it is my long-time go-to forms solution in React web development.

Formik

Formik is 100% compatible with React Native and React Native Web. However, because of differences between ReactDOM's and React Native's handling of forms and text input, there are some differences to be aware of. This section will walk you through them and what we consider to be best practices.

Example:

Redux Form

This simple App should get you familiar with these Libraries and their use case.

View full example with Native Base Redux Form Example

Formik Validation

  • yup

Yup is a JavaScript object schema validator and object parser. View on Github

Add Yup to your project

Form ScrollView

ScrollView component that handles keyboard appearance and automatically scrolls to focused TextInput.

  • react-native-keyboard-aware-scroll-view. View on Github

Example:

View config my repo ScrollableAvoidKeyboard

Android Support

You can easily enable it by setting windowSoftInputMode in AndroidManifest.xml. You need to enable Android Support with the following steps:

  • Make sure you are using react-native 0.46 or above.
  • Set windowSoftInputMode to adjustPan in AndroidManifest.xml.
  • Set enableOnAndroid property to true.

Use