Is $patch atomic? #1343
Replies: 2 comments
-
Subscriptions will fire after patch but regular watchers will fire depending on the flush option. Eg sync +deep will fire multiple times |
Beta Was this translation helpful? Give feedback.
-
Thank you @posva but I just realized that my question was unclear and when I read your answer I also realized my question was irrelevant :) To clarify - I wanted to know whether re-rendering would fire for every property change, not reactivity. Which, when I though about it, I realized would fire only once at the end because of the way Vue caches reactive updates. So with this in mind there would be no difference if I update my state properties one by one or with a Which also answers one of my previous wonders about the usage of |
Beta Was this translation helpful? Give feedback.
-
Is pinia's
$patch
method atomic in the sense that if I'm changing multiple state properties in$patch
then would reactivity fire for every property change (while in$patch
) or will it fire at the end of$patch
, when it changed all the properties?Beta Was this translation helpful? Give feedback.
All reactions