I don't understand this onSubmit behaviour #3562
Unanswered
DavidMorgan92
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have an isolated example here: https://github.com/DavidMorgan92/address-form
If you run the test you will find that one version of my AddressForm component fails but the other succeeds.
The first version passes down an onSubmit prop to the Formik form like this:
It fails with the test with this message:
When I add an intermediate step like this the test passes:
Can someone help me understand why this is the case? Why are those extra values being passed to the onSubmit function without the intermediate function?
Thank you very much.
Beta Was this translation helpful? Give feedback.
All reactions