Open dy opened 4 years ago
Must useInput(name) create ref, if no corresponding element found?
useInput(name)
let [ref, setValue] = useInput(name)
Nope, value must be first, ref is an argument.
value
But what if combine value with input?
let [{ value, ref, error, disabled }, { disable, validate, set, get, reset }] = useInput(name, default) // or better keep convention let [value, { ref, error, disabled, disable, validate, set, get, reset }] = useInput(name, default) let { value, ref, error, disabled, disable, validate, set, get, reset } = useInput(name, default)
Must
useInput(name)
create ref, if no corresponding element found?Nope,
value
must be first, ref is an argument.But what if combine value with input?