import React from "react"; import { useFormikContext } from "formik"; import TextInput from "../TextInput"; import ErrorMessage from "./ErrorMessage"; function AppFormField({ name, width, ...otherProps }) { const { setFieldTouched, handleChange, errors, touched } = useFormikContext(); return ( <> setFieldTouched(name)} onChangeText={handleChange(name)} width={width} {...otherProps} /> ); } export default AppFormField;