You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I type a single letter into any text field I get the error:
TypeError: undefined is not an object (evaluating '(i === 0 ? obj : resVal)[pathArray[i]]')
I tried removing validationSchema and I still got the error. Separately, I tried removing withNextInputAutoFocusForm and withNextInputAutoFocusInput, and still got the problem. It feels like a bug in handleTextInput. Maybe I'm doing something stupid in the syntax below.
I use this library with Formik v2.1.5 on my React Native app (Expo), and it works just fine.
From the error message, I think this has to do with an upgrade made in Formik v2^, which requires you to provide a value for each of your form elements in an object passed to your Formik component's initialValues prop.
Okay, I've successfully reproduced this error in my Formik v2+ app, and I can confirm it's what I mentioned above. You don't need to downgrade your Formik, just include the initalValues prop on your <Formik> component.
I'm basically using the demo Gist verbatim:
https://snack.expo.io/@almouro/react-native-formik-gist
When I type a single letter into any text field I get the error:
I tried removing validationSchema and I still got the error. Separately, I tried removing withNextInputAutoFocusForm and withNextInputAutoFocusInput, and still got the problem. It feels like a bug in handleTextInput. Maybe I'm doing something stupid in the syntax below.
From
package.json
:Code:
The text was updated successfully, but these errors were encountered: