0
votes

I have created a custom form handler for formik, which sets touched to true on page refresh for each input field. I placed a console.log on onBlur for each input field, and on page refresh the onBlur is called.

This causes the touched variable to be set to true for all the field.

Here is the sandbox

https://codesandbox.io/s/priceless-bird-e82wi

1

1 Answers

0
votes

Remove autoFocus="true" from your input field and it's work fine. Below is working codesandbox URL:

https://codesandbox.io/s/clever-jackson-odcjt