diff --git a/package.json b/package.json index 5a9bce9..f966811 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "safe-form", - "version": "0.4.0", + "version": "0.5.0", "description": "⚡️ End-to-end type-safety from client to server.", "main": "dist/safe-form.es.js", "types": "dist/index.d.ts", diff --git a/src/useForm.ts b/src/useForm.ts index 22fc54f..c557b4d 100644 --- a/src/useForm.ts +++ b/src/useForm.ts @@ -82,7 +82,10 @@ export const useForm = ({ }, []) const setValues = useCallback((newValues: Input) => { - values.current = newValues + values.current = { + ...values.current, + newValues + } }, []) const validate = useCallback(() => {