From e5eb69057a32a46235952c75498c018915c2eaa1 Mon Sep 17 00:00:00 2001 From: cupcakearmy Date: Sat, 19 Oct 2019 16:57:41 +0200 Subject: [PATCH] testing for setForm, setField and setErrors --- test/test.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/test.tsx b/test/test.tsx index b9036dd..f995469 100644 --- a/test/test.tsx +++ b/test/test.tsx @@ -13,7 +13,7 @@ const initial = { } const Index: React.FC = () => { - const { field, form, errors, isValid, setForm, setErrors } = useForm(initial, { + const { field, form, errors, isValid, setForm, setErrors, setField } = useForm(initial, { username: [ /^test/, { @@ -37,6 +37,7 @@ const Index: React.FC = () => { const reset = () => { setForm(initial) + setField('username', 'asdf') } const error = () => {