884 questions
0
votes
2
answers
20
views
Vue 3: Pinia Storage in Router Guards
My goal is to restrict access for authenticated users to the /login and /register routes
My Pinia Storage user.js contains user info and computed boolean property isAuthorized, when I am trying to use ...
0
votes
0
answers
51
views
Vue JS 3 reactive() very slow
I have a very basic Vue + Vite + Router + Pinia application that has a reactive({}) object in a Pinia store. If I update it with 1000 items it will freeze the browser for 3-5 seconds when it should be ...
Best practices
0
votes
0
replies
24
views
Repository pattern + useAsyncData + Pinia store, hydration + caching problems?
We follow this article to write all our API calls https://medium.com/@luizzappa/nuxt-3-repository-pattern-organising-and-managing-your-calls-to-apis-with-typescript-acd563a4e046 so we can fetch a ...
0
votes
0
answers
52
views
How to correctly set up Pinia with Inertia.js SSR in AdonisJS 6? Getting "getActivePinia() was called but there was no active Pinia"
I am building an application using AdonisJS 6, Vue 3, and Inertia.js. I'm trying to integrate Pinia for state management, but I'm running into an error:
I read online and see other issues here, but I ...
Best practices
0
votes
1
replies
49
views
How to reset a pinia store variable
I have a situation where a pina store variable should be reset as soon as it is consumed. Apparently because of reactivenes I cannot do:
defineStore('SystemStore', {
state() {
return {
...
0
votes
3
answers
74
views
How to conditionally change the component or paths in routes based on a value stored in pinia store?
How can I dynamically change the path and components in the routes, based on a value from pinia store?
I tried to check the condition in the routes, I get an error:
store was accessed before it was ...
0
votes
0
answers
51
views
Sorting items in a Pina store is very slow
I have a Pinia store defined like this:
export type Era = {
id: number
name: string
start_year: number
end_year: number
item_count: number
}
const settingStore = {
eras: ref([] as Era[])...
0
votes
1
answer
266
views
Nuxt4 Pinia is not displaying on devtools when redirecting from pages/index.vue to pages/[market]/index.vue
Good day, I am trying to migrate my code from vue 3 to Nuxt v4 and I was trying to setup on the index page where the page content should be based on the dynamic param "market".
So I tried to ...
0
votes
2
answers
174
views
Can't use Pinia store in Nuxt app.vue root component
Hi i'm trying to call my pinia store from within my app.vue root component.
I'm using Nuxt3.
But i'm getting a 500 error with the following message :
[🍍]: "getActivePinia()" was called but ...
1
vote
1
answer
89
views
How to properly render firestore retrieved data stored inside pinia?
I have two variables in my userStore.js, userData which is populated by the object returned by the login function and profileData which I populate with data from firestore using a VueFire composable ...
0
votes
1
answer
86
views
Auto refresh data is not working in pinia store
When I change body.title in v-text-field I see success requests in network tab and response with new data but there is no changed data on the page.
otherwise, if I use const { data: _data }: any = ...
0
votes
1
answer
132
views
Pinia $onAction with setup store
I'm converting an options Pinia store 'currentlyAnOptionsStore' to setup.
In another store I'm using $onAction to do stuff in the listening store when an action is triggered in the '...
0
votes
0
answers
73
views
pinia store and Nuxt navigateTo - time-lag in state update
In an Nuxt application, using SPA, so SSR:false I have a stores/auth.ts that contains:
export const useAuthStore = defineStore('auth', () => {
const refresh_token = ref<string | null>(...
3
votes
1
answer
192
views
Vue / Pinia / Typescript calling class instance method in Pinia store results in error
I have a project that utilizes Vue 3 (w/ Composition API), Pinia, Typescript, and SignalR. I'm running into an issue with calling a class instance method from within a pinia store action.
This is the ...
1
vote
0
answers
83
views
Vue SignalR w/ jQuery Project - SignalR events only work on manual refresh in dev server
I have a bazaar issue occurring with my project related to the SignalR events and jQuery. For starters, my client project is built with Vue 3 (w/ Composition API), Vite, Pinia, SignalR w/ jQuery, and ...