Skip to content

Intercept a $patch #2632

Closed Answered by posva
ghost23 asked this question in Help and Questions
Apr 2, 2024 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

You cannot intercept, only react to patches with store.$subscribe() (can be within a pinia plugin too). But it's not possible to do any validation. It sounds that what you want to do is an action that handles the validation of the input. It would help to add private state to that

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@ghost23
Comment options

Answer selected by ghost23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants