Last active
November 27, 2019 12:22
-
-
Save yuritoledo/df6f3b2c379b389925826034e3128085 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from "react"; | |
import { useFormik } from "formik"; | |
const initialValues = { | |
name: "", | |
email: "", | |
address: { | |
street: "", | |
number: "", | |
city: "" | |
}, | |
password: "", | |
confirmPassword: "" | |
}; | |
const MyForm = () => { | |
const onSubmit = values => {}; | |
const formik = useFormik({ | |
initialValues, | |
onSubmit | |
}); | |
return ( | |
<form> | |
<input placeholder="Name" /> | |
<br /> | |
<input placeholder="Email" /> | |
<br /> | |
<input placeholder="Password" /> | |
<br /> | |
<input placeholder="confirm password" /> | |
<br /> | |
<input placeholder="Address" /> | |
<br /> | |
<input placeholder="City" /> | |
</form> | |
); | |
}; | |
export default MyForm; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment