Replies: 2 comments 10 replies
-
It should be fine unless you change the values inside that watcher or something else does. Generally, form state should not be used in a store but in some cases it is viable. But no, this is not a bad idea. You just need to be careful about what |
Beta Was this translation helpful? Give feedback.
-
@logaretm instead of saving errors, is there a way I can do a simpler way and just validate again on The values are already stored in the parent state, and i wouldnt want every field to be validated on mount (for the multi-step form), only those which have already have input values |
Beta Was this translation helpful? Give feedback.
-
I want to store input state for all fields in Pinia store, in a format that is easily accessible/modifiable to other components.
I noticed there is a Pinia/vee integration method to do this, but I like the fact that Vee keeps its own internal state in
values
to contain things like touched, etc. Otherwise my other components modifying the inputState would need to understand that structure of Vee to update a value.I was thinking of doing this... is this a huge no no or will it cause problems given that initialValues will be re-propagating every single value change?
It seems to work perfect I am just concerned about weird edge cases, as I don't know how this reactive recursive loop will play out in different scenarios
Beta Was this translation helpful? Give feedback.
All reactions