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
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:
This simple App should get you familiar with these Libraries and their use case.
View full example with Native Base Redux Form Example
yup
Yup is a JavaScript object schema validator and object parser. View on Github
Add Yup to your project
ScrollView component that handles keyboard appearance and automatically scrolls to focused TextInput.
react-native-keyboard-aware-scroll-view
. View on GithubExample:
View config my repo ScrollableAvoidKeyboard
You can easily enable it by setting windowSoftInputMode
in AndroidManifest.xml
.
You need to enable Android Support with the following steps:
windowSoftInputMode
to adjustPan
in AndroidManifest.xml
.enableOnAndroid
property to true
.