Changing Pinia state outside of component #2246
Unanswered
christine927t
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
-
I'm trying to implement Pinia in a Nuxt 3/Vue 3 app. I'm using Sidebase for authentication. I have a file to handle the auth in server/api/auth/[...].js and this is where I need to update the Pinia state (after I get the auth token and user info from two api calls).
Based on my console.logs inside the Pinia store, the state IS changing, however, the changes are not reflected on the front end (browser or devtools). I'm not getting any error, I just don't see the state being updated anywhere other than the console.log statements in my terminal.
Any help or suggestions of what to try would be greatly appreciated! thank you
/server/api/auth/[...].js
Here's just the one store but neither are updating in the browser:
/stores/tokenStore.js
And as you can see here in devtools, no values are being updated.
Beta Was this translation helpful? Give feedback.
All reactions