Category "vuex"

How to return state data from vuex action in components

I have an action that fetches data from my database, I assign the response from the request to various objects/variables in the state in my vuex store, this act

vuex filter method not working corectly. It shows all items

I have component Filter to find a title of movie from AllMovies. When i filter, the movie list is not working properly setFindMovies is method, filteredMovie

vuex state not updating UI on change

I am in the process of converting a vue2 to vue3 project and noticed my UI isn't updating when objects from my vuex store are updating. Here is how I create my

Problems using Vee-Validate's <Field /> and Vue Multiselect

Hoping if some of you can help me, probably I'm gettings things wrong but I just can't make the Field component to get the output from the Multiselect element.

Vuex/quasar - mutate state from firebase 9 on boot

I'm using quasar with firebase 9. I'm trying to set the state with actions during the boot of the project. I have data in firebase that I want to load only once

Watch Vue 3 global variable for changes

I set a provider in my main.ts file: app.provide('currentPage','test1') And then inject it in a component Home.vue: inject: ['currentPage'], I then can update i

How to access vue router in Vuex store module actions with Quasar framework?

I am using Quasar Framework v2 Beta Vue 3 Composition Api Vuex 4 Typescript My problem: When I import router and try to redirect User in Vuex store module actio

Props typing in Vue.js 3 with TypeScript

I'm trying to type hint my props in a Vue 3 component, with composition API. So, I'm doing this: <script lang="ts"> import FlashInterface from '@/interfac

props keep showing as $attrs in VUE DEV TOOLS

enter image description hereenter image description here My props keep showing as $attrs in VUE DEV TOOLS I have tried disabling attrs using inheritAttrs: false

Vue stored valued through props not being reactive

So I pass value using [props] and stored it in child component's data. However, when passing [props] value changes from parent, it's not updating in child compo

Vue stored valued through props not being reactive

So I pass value using [props] and stored it in child component's data. However, when passing [props] value changes from parent, it's not updating in child compo

Vue version not in any npm list

I have sometime to code with vue and node. I returned to my windows 10 system and using git bash I have node in my windows system : $ node -v v12.14.1 Then I d

Returning data from a Vuex action

Can I return data from a Vuex action or do I need to update the store? I've got an action defined but it returns no data: getData() { return { "a" : 1, "b"

How to handle permissions for route from database?

In Vue, when I want to restrict some pages for some users, in router I define a permission in meta, like this: routes: [ { path: 'transport',

How to mock $nuxt object in vue-test-utils and jest

I am using vue-test-utils and jest in order to test my code. My test run without any problem except if it pass through the code below $nuxt.$store.commit("devi

Passing value to store getters Vue.js

I'm trying to pass ID as parameter to store getter, but when i console that id I get undefined. Can someone help me with this: Here is my code: This is how i

Vue - How to access component's property from Vuex

In my app I use Vuex to perform async tasks. In this case I use it to log user to my app. When user is logged and axios.then() is being performed I want to info

How to pass an argument to Pinia store?

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.

Change another module state from one module in Vuex

I have two modules in my vuex store. var store = new Vuex.Store({ modules: { loading: loading posts: posts } }); In the module loading

How to access Vuex module getters and mutations?

I'm trying to switch to using Vuex instead of my homegrown store object, and I must say I'm not finding the docs as clear as elsewhere in the Vue.js world. Let'