Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [pinia]

Pinia is a JavaScript store library for Vue.js, its purpose is to share a state across components/pages.

pinia
0 votes
1 answer
20 views

How to set proxy in Nuxt3?

I can't understand why setting proxy in nuxt 3 doesn't work When im trying to get data i see incorrect url in development tools Below is my code, what am i doing wrong? nuxt.config.js export default ...
Maxim's user avatar
  • 11
-1 votes
1 answer
42 views

Is it possible to optimize this pinia store

I am converting an existing app with a complex vuex store to pinia. When a user logs in, we get a response with all of their access levels as a json string. There are actually many more access objects ...
whoacowboy's user avatar
  • 7,317
0 votes
0 answers
18 views

Why do I have this execution sequence in a Vue 3 program?

I am working on a project with Vue 3, Vuetify 3 and Pinia. Out of simple curiousity, I put a console.log() statement at the start of the following files in my project: main.ts, App.vue, Tracker.ts (my ...
Henry's user avatar
  • 1,611
0 votes
1 answer
31 views
+50

How Do I Pass Streaming Data from Nitro API to Pinia Store so I can use it in Nuxt Component?

In my Nuxt app I have a Pinia store and am making an API call via the Nitro server that gets streaming data in response. When I try to update the Pinia store with the streaming data it does not update,...
av0000's user avatar
  • 1,937
0 votes
2 answers
41 views

How to properly use Pinia store in root vue component?

My main.ts: import './assets/tailwind.css' import './assets/wordpress.css' import { createApp } from 'vue' import { createPinia } from 'pinia' import App from './App.vue' import router from './...
Simao Gomes Viana's user avatar
0 votes
0 answers
29 views

Creating dashboard with Metronic & Vue & Tailwind

So I want to create a dashboard with metronic vue tailwind. I have 2 zip files, the first is metronic vue 8 and the second is metronic tailwind html 9. first zip is a sample dashboard with vue and ...
techno's user avatar
  • 21
0 votes
0 answers
40 views

How to retrieve the Pinia Store State variable globally in Vue3?

I'm trying to access the Pinia Store State variable from another component (coming from my Websocket Server). Inisde the Store, the message comes up correctly. However, when I try to reference the ...
Josh's user avatar
  • 25
0 votes
0 answers
32 views

Nuxt 3 dynamic page after refresh redirect to 404

can someone help me? I have such a dynamic page on the host the page opens upon click, but after the refresh I get 404 pages/blog/[slug].vue <script setup> import { useBlogStore } from '@/store/...
Miqayel 's user avatar
0 votes
0 answers
18 views

Create a route (Laravel 10 - Nuxt 3 )

[nuxt] error caught during app initialization Error: Page not found: /password-reset/46f9fe46fc92949ec48113486813cdd5f03add89f6d9cae0a983c2511a863097?email=ospreystudio2020@gmail.com link that needs ...
Vadim Yanyushkin's user avatar
0 votes
1 answer
15 views

Pinia store contains null values if referenced from onMounted hook

I'm having an issue where my Pinia store will contain null for each of its state properties if I try to access it via onMounted hook. It's a little more complex than that. Here is the call stack ...
Adrian's user avatar
  • 3,422
0 votes
1 answer
34 views

How do you test a Pinia store state changed by a function within a component?

So I have a very simple test for testing a simple function. Basically I have a "uiStore" with a state "isNotificationsOpen". I have a component that has a function "...
TheYuwana's user avatar
  • 183
2 votes
1 answer
71 views

[Vue warn]: Failed to resolve component: UserBasket

I ran into an issue that had me scratch my head for a few days now. I am doing a application with vuejs3 frontend. For all the code I provide I removed the most other code and kept what I think is ...
Tarakos's user avatar
  • 23
0 votes
0 answers
33 views

Is there any downside to using Lifecycle hooks in pinia store actions?

I discovered that this is working without a problem: Store.ts function setParentRoute(route: Route | undefined) { onBeforeMount(() => { parentRoute.value = route; }); ...
xTheWolf's user avatar
  • 1,846
1 vote
0 answers
47 views

i use Vuexy template that is build on vite vue3 and vuetify and i use pinia store, i want to add SSR to my project

the problem is that i get errors in localStorage and window being undefined in all my pages like themes, plugins and etc and my project is considered as a middle-large sized one so i can't update my ...
tareq safia's user avatar
0 votes
1 answer
295 views

Cannot read properties of undefined (reading 'Vue') at initBackend, how can i solve this error?

I’m working on a Vue 3 application using Pinia for state management, and I’m encountering an issue where added messages are not rendering on the screen. Additionally, I’m getting a persistent error in ...
HYEIN YU's user avatar

15 30 50 per page
1
2 3 4 5
58