No reactivity if the store is updated from a different component? #1058
Unanswered
Sjoerd82
asked this question in
Help and Questions
Replies: 1 comment 2 replies
-
Wow. Ok, this is weird but I found the culprit. It has something to do with having multiple stores somehow. In my Vue's main.ts I loaded a different (global) store, which overwrites my "route store". stores/useStoreGlobal.ts:
stores/useStorePage.ts:
main.ts (simplified):
In the view, directly (dyamically) loaded from the router:
Pretty sure we're allowed to have multiple stores, right? I've been staring at this for days, maybe it's a stupid typo somewhere, but I cannot explain this at all and it feels like a bug. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm in Vue2 with the Composition API and was expecting to have a reactive boolean or a reactive getter, but I get neither:
EDIT: Update 15/02; Turns out it actually works when setting the value within 'regular' function in the composable, but NOT when setting it from within a HOOK. Maybe something to do with context..
Component 1 (View):
Component 2 (composable):
I've tried various ways, this was my last attempt after learning that storeToRefs() is broken in Vue2 (#852)
Beta Was this translation helpful? Give feedback.
All reactions