Pinia state doesn't update more than once. #2515
Unanswered
ImmortalBoi
asked this question in
Help and Questions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In my vue application, the structure is like this:
App.vue
-GroupWrapper
--GroupListing
-PeopleWrapper
--PeopleListing
-ConversationWrapper
I have a user store that uses pinia, and my main use of it is calling user.findChats() in the App.vue
App.vue
where it finds all the chats and if it's of the type "dm" it adds it to the dm_chats array and if it's the type "gm" it adds it to the gm_chats array,
chat.js
Where the dm_chats should be displayed in a v-for in PeopleListing
PeopleWrapper.vue
and the same for gm_chats in GroupListing,
However after for looping over the array, the only update on screen is once, only when it fetches from firestore the document for a chat of type "gm", even tho when using Vue Devtools or console.log, the dm_chat and gm_chat are properly populated, it's just not updating them.
What I've tried was:
After all that, it had the same result.
Now this is probably me missing something very basic, but I can't for the life of me find out what it is. This also isn't with just the dm_chats or the gm_chats, this is with every other variable in both the user and chat stores. So if anyone could let me know what I'm missing, I'd be super thankful.
Beta Was this translation helpful? Give feedback.
All reactions