Why can't we use ref for initialValues in the useForm composable? #4955
-
According to the documentation, it says Is this discussion related? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Because it brings with it a set of expectations, like what happens when that ref changes? We can update the values then, but what if the user already interacted with the form and changed the values? So in order to avoid introducing foot guns and satisfying one use-case over the other, it is recommended that you be explicit and use |
Beta Was this translation helpful? Give feedback.
Because it brings with it a set of expectations, like what happens when that ref changes? We can update the values then, but what if the user already interacted with the form and changed the values?
So in order to avoid introducing foot guns and satisfying one use-case over the other, it is recommended that you be explicit and use
resetForm
when you want the changes to reflect.