vuex Questions

5

Solved

I am running ESLint and I am currently running into the following ESLint error: error 'state' is already declared in the upper scope no-shadow const state = { date: '', show: false }; const...
Jevons asked 8/5, 2017 at 8:37

4

How can I clone data from vuex state to local data attribute? State this.tsStore.shemes Data Attribute data () { return { shemes: [] } } I've tried do this in updated () this.shemes = this.tsStor...
Arlynearlynne asked 30/9, 2018 at 19:39

2

I would like to implement this kind of logic that assign this.$store.value to local data. This is how I do in pages/index.vue for instance. method: { this.value = this.$store.value } I want to ...
Scylla asked 31/10, 2018 at 7:21

3

Solved

Following from the Vuex documentation for organising the store modularly (https://vuex.vuejs.org/guide/modules.html), I have the following in: store/index.js: import Vue from "vue"; import Vuex f...
Forney asked 4/12, 2019 at 13:4

2

Solved

Using Vue and Vuex, I have followed the recommended practice of making changes to state only via mutations. So all Vue components will make changes to state via the use of an action which then in t...
Widgeon asked 3/10, 2018 at 15:40

1

Solved

Hi i have a requirement of combining 2 vuex store into a single store (both stores are of different projects) import storeA from '/path'; import storeB from '/path'; now combined both store const...
Spearing asked 25/11, 2021 at 16:15

3

Solved

let's say I have following tree: [ { name: 'asd', is_whatever: true, children: [ { name: 'asd', is_whatever: false, children: [], }, ], }, ], The tree is stored in a module via Vuex u...
Cutcherry asked 13/8, 2017 at 21:30

2

Solved

I store token after success login call in vuex store like this: axios.post('/api/auth/doLogin.php', params, axiosConfig) .then(res => { console.log(res.data); // token this.$store.commit('lo...
Plano asked 22/12, 2017 at 19:51

5

Solved

Im building my app with VueJS and Vuex and I'm facing the issue when I have Multiple modules using the same data fields. Its about API configuration like dat. getUsers ({ state, commit }) { axios...
Gaultheria asked 18/1, 2018 at 17:38

4

Issue ✅ Vue 2: computed properties are updated after vuex store mutation. ❌ Vue 3: computed properties are not updated after vuex store mutation. Vuex 4 Purpose: Get posts from Firestore. Add to &q...
Carry asked 7/12, 2020 at 5:14

4

Solved

I'm new to Vue.js Nuxt and all front-end stuff. I have a question about API calls. I'm not sure what is the right way, the best practice here. I have a store. In that store, I have actions that are...
Ardis asked 1/9, 2020 at 17:59

4

I'm having a hard time making my vuex modules work with NuxtJS SSR, TypeScript and vuex-module-decorators. I tried following guide from the official nuxt website and the vuex-module-decorators, bu...
Supinate asked 21/2, 2020 at 13:51

5

Solved

I have a Vue.js app. This app is using Vuex for state management. My store looks like this: const store = new Vuex.Store({ state: { items: [] }, mutations: { MUTATE_ITEMS: (state, items) =&g...
Indopacific asked 8/6, 2018 at 19:21

4

Solved

I'm trying to get a Vuex store to be Typescript friendly. I'm building the store as explained here. However, when I access this.$store from a component, the type is Store<any> . I couldn't ...
Yungyunick asked 4/11, 2018 at 10:45

2

Solved

Is it possible to dispatch an action between namespaced modules? E.g. I have Vuex modules "gameboard" and "notification". Each are namespaced. I would like to dispatch an action...
Mcnalley asked 23/3, 2017 at 18:26

2

Solved

I want to add the class menu-opened on the body tag when I click on the menu burger div. My div <div v-on:click="openMenu"></div> The openMenu method methods: { openMenu() { cons...
Duodecimal asked 30/8, 2018 at 14:34

4

Fiddle : here I am creating a webapp with Vue 2 with Vuex. I have a store, where I want to fetch state data from a getter, What I want is if getter finds out data is not yet populated, it calls di...
Basion asked 18/11, 2016 at 13:46

3

Both data() and async data() gives the same result (and it is obvious that the results from asyncData() override the results from data()) and both results in HTML code in the source code (i.e the ...
Hypercorrect asked 1/12, 2018 at 8:41

8

Solved

My app uses the Firebase API for User Authentication, saving the Login status as a boolean value in a Vuex State. When the user logs in I set the login status and conditionally display the Login/L...
Stillhunt asked 26/3, 2017 at 10:19

2

I am working on nuxt-edge + auth.nuxt + vuex project and in the nuxtServerInit method of the store I am only logging a message in the console. When the site is reloaded the message gets printed mul...
Clarisclarisa asked 12/9, 2018 at 9:14

2

Solved

I recently was struggling with implementing modules in Vuex for the first time. I couldn't find much info on the console error message I was getting ( rawModule is undefined ), so I thought I'd sha...
Felske asked 2/2, 2018 at 19:58

4

Solved

I would like to know whats the correct way of using ...mapActions([]) within a Typescript vue class component. this is how I do it: <script lang="ts"> import { Component, Prop, Vue } from "...
Belshin asked 6/2, 2020 at 16:16

6

Solved

NuxtServerInit is not working on initial page render on nuxt js vuex module mode. But it works on Classic mode. Following code is the flow I used. My api call api/CategoryApi.js import axios fro...
Millman asked 28/2, 2019 at 12:26

3

Solved

I'm trying to test a basic Vue Component that makes reference to a Vuex store. I thought I followed Vue's example (https://vue-test-utils.vuejs.org/guides/using-with-vuex.html#mocking-getters) to a...
Converge asked 5/2, 2019 at 1:23

3

Solved

I used nklayman/vue-cli-plugin-electron-builder to create an electron app prepared with Vue/Vuex. It ships with files main.js, background.js including Vue component starting point. But I can't get ...
Gall asked 7/7, 2020 at 14:42

© 2022 - 2024 — McMap. All rights reserved.