Skip to main content

Questions tagged [pinia]

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

0 votes
0 answers
4 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
0 answers
17 views

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,987
0 votes
2 answers
35 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
23 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
37 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
25 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
13 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
31 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
67 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
29 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
39 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
226 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
1 vote
1 answer
70 views

How to use Pinia with a Map of table configuration objects

I am using Pinia to manage the state of different DataTables throughout my application. It's possible for multiple tables to be opened "on top" of each other (i.e. in overlay(s) over each ...
Dennis's user avatar
  • 3,520
1 vote
1 answer
69 views

VueJS 3.4 - Computed value to get from two sources but set in one

The logic in my app is to fetch some array of objects from API with @tanstack/vue-query, update some of those objects and send a patch request only for the updated objects. So I created an empty array ...
pashata's user avatar
  • 348

15 30 50 per page
1
2 3 4 5
58