Skip to content

Instantly share code, notes, and snippets.

@yuritoledo
Last active November 27, 2019 12:22
Show Gist options
  • Save yuritoledo/df6f3b2c379b389925826034e3128085 to your computer and use it in GitHub Desktop.
Save yuritoledo/df6f3b2c379b389925826034e3128085 to your computer and use it in GitHub Desktop.
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