Replies: 1 comment
-
I am trying to set DefaultValues. Nothing working. All error ` const [users, setUsers] = useState({ email: "", firstname: "" }); }); Type '{ [x: string]: any; }' is not assignable to type 'AsyncDefaultValues | DefaultValues'.ts(2322) |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I set defaultValue in input field but getValues do not show data unless i enter. I needdata from default Values for each field
`
const {
register,
handleSubmit,
control,
getValues,
setValue,
setError,
formState: { errors },
} = useForm({
});
`
Above give me syntax error
Type '() => {}' is not assignable to type 'AsyncDefaultValues | DefaultValues'.
Type '() => {}' is not assignable to type 'AsyncDefaultValues'.
Type '{}' is missing the following properties from type 'Promise': then, catch, finally, [Symbol.toStringTag]ts(2322)
Beta Was this translation helpful? Give feedback.
All reactions