useCollection not reactive #1616
Replies: 1 comment
-
Argh after posting this I found the answer. I need to use storeToRefs in order to keep Pinia reactivity const { applications: apps } = storeToRefs(applicationsStore) |
Beta Was this translation helpful? Give feedback.
0 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.
-
I followed the example in the docs to create a reactive collection:
I'm doing the assignment in the onMounted hook:
However, on logout / login the applications are empty on first visit. I have to leave and re-enter the page to populate the applications. This only happens in the above Pinia store case. When I do the assignment directly in the on mounted it works fine.
Am I missing something?
Beta Was this translation helpful? Give feedback.
All reactions