formik icon indicating copy to clipboard operation
formik copied to clipboard

Formik not working on react native 0.65.1

Open acollazomayer opened this issue 4 years ago • 14 comments

Bug report

I just upgraded my react native 0.64.2 app to the latest version 0.65.1 and all of a sudden all my forms stopped working.

Current Behavior

Forms are not working in react native 0.65.1. I am not able to submit nor validate forms

Expected behavior

Everything form should work as before

Reproducible example

Suggested solution(s)

Additional context

Your environment

Software Version(s)
Formik 2.2.9
React 17.0.2
TypeScript
Browser
npm/Yarn
Operating System ios

acollazomayer avatar Aug 27 '21 10:08 acollazomayer

I have the same versions: Formik 2.2.9., react-native 0.65.1 - forms are not working on ios and android. Unable to submit or validate form.

mblenton avatar Sep 15 '21 11:09 mblenton

+1 I can submit without validate

longb1997 avatar Sep 15 '21 14:09 longb1997

@mblenton @longb1997 did you found Any solution for this?

acollazomayer avatar Sep 17 '21 13:09 acollazomayer

Nope, i thinking about switch to react-hook-form

longb1997 avatar Sep 17 '21 13:09 longb1997

@longb1997 I tried to do the change, but I encounter some errors using yup validations too.

acollazomayer avatar Sep 17 '21 14:09 acollazomayer

@longb1997 I was able to make it work using Hermes engine... there is definitely something fishy going on...

acollazomayer avatar Sep 19 '21 16:09 acollazomayer

@acollazomayer, you turn on Hermes and it works?

longb1997 avatar Sep 19 '21 17:09 longb1997

any update?

longb1997 avatar Sep 29 '21 16:09 longb1997

When I press submit, my form validation fails every field even though they pass the yup schema requirements. Any update?

bombillazo avatar Oct 01 '21 02:10 bombillazo

I am using with rn 0.66.1 everything seems to work fine, i have hermes enabled on both ios and android

aliraza-noon avatar Oct 19 '21 08:10 aliraza-noon

In my case, the form has an issue when I have enabled validateOnMount and I press submit, the form goes crazy. It validates the form but for some reason sort of resets and sets all fields as invalid, even if all fields pass.

If I disable that setting, everything works as expected (validation works correct and the form state stays correct after the submit action is completed)

bombillazo avatar Oct 19 '21 13:10 bombillazo

Using hermes fixes my issues.

levino avatar Nov 24 '21 09:11 levino

@mblenton @longb1997 did you found Any solution for this?

I needed to completely disable storybook - comment imports etc...

mblenton avatar Nov 24 '21 10:11 mblenton

Any updates?

geriko2000 avatar Feb 06 '25 05:02 geriko2000