Bad practice in cart example? #1529
-
|
I think this example propagates some questionable practices, since getters are used to derive computed values and here they mutate the state as well, as far as I can see. https://en.wikipedia.org/wiki/Command%E2%80%93query_separation pinia/packages/playground/src/stores/cart.ts Lines 9 to 22 in 08bd464 |
Beta Was this translation helpful? Give feedback.
Answered by
posva
Aug 9, 2022
Replies: 1 comment 1 reply
-
|
that example doesn't mutate the state, |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
hokkaido
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
that example doesn't mutate the state,
itemsis a local variable