Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
import React from 'react';
import { View, TextInput as Input, Text } from 'react-native';
import { ErrorMessage } from 'formik';
export default function TextInput(props) {
console.log(props);
return (
<View>
<Input
onChangeText={props.form.handleChange(props.field.name)}
onBlur={props.form.handleBlur(props.field.name)}
value={props.field.value}
/>
<ErrorMessage
name={props.field.name}
render={msg => (
<View style={{ color: 'red' }}>
<Text>{msg}</Text>
</View>
)}
/>
</View>
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.