Questions tagged [pinia]
Pinia is a JavaScript store library for Vue.js, its purpose is to share a state across components/pages.
pinia
864
questions
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 ...
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,...
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 './...
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 ...
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 ...
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/...
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 ...
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 ...
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 "...
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 ...
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;
});
...
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 ...
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 ...
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 ...
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 ...