pinia Questions

1

Solved

I have two vue components with own loaders, mounted into two already rendered DOM nodes: Component A: import { createApp } from 'vue' import ComponentA from '@/Vue/ComponentA.vue'; import {createPi...
Junko asked 10/8, 2022 at 14:23

1

Solved

I'm currently working on a project where to fetch data from an API. I need access to that data all over my app, so I thought that the best option was to use Pinia (usually I used Vuex, but I want t...
Orlina asked 10/3, 2022 at 2:34

1

Question has been updated I'm trying to use a Pinia's store with web components created with Vue.js but I have this error in the console: [Vue warn]: injection "Symbol(pinia)" not found ...
Picaroon asked 24/8, 2022 at 16:5

2

Solved

I'm using Vuejs 3, vuerouter 4 and pinia and trying to put a navigation guard in some routes, as per the example in the documentation (if a user is not authenticated and is not on the login page, s...
Defrayal asked 16/5, 2022 at 4:52

2

How I can call action from pinia store in vue 3 component? I use composition API. For example, I would like to import 'openLessonCard' - it is action in pinia store. But this method for import don'...
Valvulitis asked 27/4, 2022 at 15:37

2

I am a Vue.js developer who is coming up to speed with the the new features added to Vue 3, from Vue 2, namely the Composition API (added in Vue 3). For State Management, it appears that alon...
Wanwand asked 24/3, 2022 at 1:26

3

I am migrating from vue 4.x to pinia, one of my file needs api key from store. But I can't make it work even though I follow the Pinia documentation . here is how I use pinia // Repository.ts impor...
Adila asked 11/1, 2022 at 18:7

1

Store (Pinia) Vs UseState If I am not mistaken, useState can replace any store like Pinia? Given that useState makes ref sharable across all components I have a hard time knowing if I should use a ...
Overlord asked 2/5, 2022 at 0:23

1

Solved

I'm working on a website that uses vue and firebase. After the authentication part the user gets to the dashboard where there is the list of his projects that are a subcollection of the user docume...
Streak asked 1/5, 2022 at 16:7

1

Solved

I can't get multiple components accessing the same store respond to updates, until I mess with a dom element to trigger new render. In my Pinia store, I have an array, and an update method: let My...
Sisera asked 29/4, 2022 at 16:29

3

Solved

I'm making a session API call in main.js and using values from the response as the initial value for my root store. In vuex it's handled this like, DataService.getSession() .then((sessionData) =&g...
Jourdain asked 23/3, 2022 at 7:7

1

Solved

I was learning some cypress from this video: https://www.youtube.com/watch?v=03kG2rdJYtc I'm interested with he's saying at 29:33: "programatic login" But he's using vue2 and Vuex. My pro...
Butts asked 5/4, 2022 at 13:34

1

Solved

After installing Pinia on my Vue 2 project, and imported it in the main.js file I got this error Failed to compile. ./node_modules/pinia/dist/pinia.mjs 1147:44-52 Can't import the named export 'co...
Josephina asked 15/4, 2022 at 11:7

1

Solved

I am building a Pokemon filtered search app using Vue 3, Composition API, and Pinia. I am attempting to set up the app so that the fetched response from the Pokemon API is passed to a store (set up...
Boneyard asked 12/3, 2022 at 18:22

2

Solved

I have following code <script lang="ts"> import { RouterView } from "vue-router"; import defaultLayout from "@/layouts/default.vue"; import dashboardLayout from ...
Avignon asked 2/3, 2022 at 13:36

3

I'm getting a weird error in the following code: Property 'length' does not exist on type '{ [RefSymbol]: true; }'. But when I check the type of foo in the getCount function my IDE tels me its of t...
Metameric asked 17/2, 2022 at 23:24

1

Solved

tl;dr How to access other getters from a parameterized getter? Normally, you can use this.myGetter; but a parameterized getter is implemented as an arrow function, wherein this is undefined. What's...
Fructuous asked 6/2, 2022 at 14:24

© 2022 - 2024 — McMap. All rights reserved.