Replies: 1 comment 1 reply
-
I think that could be inefficient since it would recreate the binding object on each re-render but it could be negligible. Feel free to measure and decide. I'm not sure how you are using vee-validate, are you using components or composition API here? In your that case I think it would be better if you use the composition API with |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
when i'm using custom components and validating it with vee validate,
i need to map the
value
of vee validate to:modelValue
and set theonUpdate:modelValue
handler to thehandleChange
method,so for every custom component i end up with :
and i'm searching a way to avoid that or reduce it
One solution i come up with is make a global function $value :
and using like that :
but i'm not sure if it's a viable solution, it does shorten it but it becomes less obvious what it does,
i was also thinking to create a directive like
v-value="{ value, handleChange }"
what do you think ?
thanks
Beta Was this translation helpful? Give feedback.
All reactions