From 69d8c7fd3cd92f76f02bfe5d13fe16d045d5a45f Mon Sep 17 00:00:00 2001 From: Nicco Date: Fri, 27 Sep 2019 14:33:15 +0200 Subject: [PATCH] Update README.md --- README.md | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/README.md b/README.md index 668352b..36d7001 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,38 @@ import ReactDOM from 'react-dom' import { useForm } from 'formhero' +const Form = () => { + + const { auto, form } = useForm({ + username: '', + password: '', + }) + + const _submit = (e: React.FormEvent) => { + e.preventDefault() + console.log(form) + } + + return ( +
+
+ + + + + +
+
+ ) +} +``` + +## 🔥 Avanced Example + +```typescript +import ReactDOM from 'react-dom' +import { useForm } from 'formhero' + const Form = () => { const { auto, form, errors } = useForm({