Is pinia getter appropriate as a watch target??? #2407
-
i'm not yet familiar with using Vue3. i have been using it continuously for the past month.
i know that the pinia getter caches values and has a readonly feature similar to Vue2's computed. so, is it not appropriate to use it on a watch?
any help would be appreciated. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
it's okay to use a getter in a watcher: watch(() => store.double, () => {}) Stores are reactive objects, so using a function is needed |
Beta Was this translation helpful? Give feedback.
it's okay to use a getter in a watcher:
Stores are reactive objects, so using a function is needed