vuex Questions

1

I have multiple vuex modues with nameSpaced: true in my application. Inside the action or mutations of the modules I want to know the name of the parent module. say I have 2 modules, 'a' and 'b', ...
Hardden asked 4/4, 2019 at 10:56

3

There are two pages (or, components with respect to vue's terminology) who both needs same set of data, which is provided via an api over http. The order in which those two components would be visi...
Mercurate asked 1/7, 2018 at 8:34

1

Solved

How do I access the Vuex store in Vue when using the setup() method? I don't have access to the regular this.$store variable anymore.
Renaerenaissance asked 18/8, 2021 at 18:53

4

I'm trying to fix a behavior in my VueJS SPA wherein a limbo state arises. The app doesn't know the JWT has already expired and therefore presents itself as if the user is still logged in. This can...
Eusebioeusebius asked 5/5, 2020 at 12:48

7

Solved

I have a component that contains some checkboxes. I need to be able to access which checkboxes are checked from other components in my Vue application, but I cannot for the life of me figure out (n...
Miner asked 9/3, 2017 at 3:55

2

Solved

I am trying to load (using mounted()) and save (with the watch: {...} method) to / from the localStorage. The two variables i am trying to save to the localstorage are 'categories' and 'locations'....
Cathycathyleen asked 24/7, 2021 at 17:3

1

Solved

The state of my application seems to load AFTER my components get loaded, so my thought was to watch for the state-getter. But how do I watch a Vuex getter in the composition API? My state & ge...
Belly asked 19/7, 2021 at 8:30

3

Solved

I use vuex-persistedstate package (https://github.com/robinvdvleuten/vuex-persistedstate) to persist data state on browser. I use Adonuxt (a mix between NuxtJS and AdonisJS). In VueX actions, I h...
Glop asked 23/3, 2018 at 16:42

2

I am writing unit tests for VueJS components and have consulted the "Applying Global Plugins and Mixins" section of Vue Test Utils Common Tips. I have a component that depends on the Vuex store so ...
Iloilo asked 23/7, 2018 at 16:28

8

I am using Vuex + axios, I want to know the best practice in handling errors for vuex + axios. What I am doing now is that when I request using axios and it returns an error, it will be committed i...
Dettmer asked 7/2, 2018 at 6:3

5

I'm trying to create a listenAuth function that watches "onAuthStateChanged" in firebase to notify the vuex store when a user has logged in or out. As far as I can tell, I'm only modifying state.au...
Tolkan asked 14/7, 2016 at 3:40

3

Solved

I'm currently receiving the following error in my VueJS web application. utc_offset is deprecated as of November 2019 and will be turned off in November 2020. Use utc_offset_minutes instead. ...
Akmolinsk asked 13/1, 2020 at 12:38

1

I am managing performing a login and the login state using Vuex. It is a standard procedure of: User submits their login details on a form The form dispatches a Vuex action to make an axios API ca...
Borage asked 15/6, 2021 at 12:13

2

I have an issue with lazy loading of my nested routes! this is my parent route: import ChildRoutes from "app/modules/child.route”; routes: [ { path: '/child', component: resolve => require...
Win asked 6/1, 2017 at 16:27

3

Solved

In my application I need some data to be loaded inside the VueX store before routing starts (for example user sessions). An example of a race condition would be the following: // In routes defini...
Harve asked 24/7, 2018 at 9:45

4

Solved

Let's suppose I have a component called FirstPage, which is my default route, now FirstPage triggers an asynchronous call, with the help of an action of the vuex store, to be made each minute to a ...
Despair asked 12/10, 2018 at 8:7

2

Solved

I'm learning Vue 3 with Vuex 4 and I'm stucked with something that I'm pretty sure it's simple but I can't see. In few words, i'm trying to set some data in state to have it available to use it in ...
Weft asked 28/3, 2021 at 20:11

5

Solved

What is the exact difference between fetch and async data. The official documentation says the following: asyncData You may want to fetch data and render it on the server-side. Nuxt.js adds an asy...
Piggy asked 13/3, 2018 at 8:27

2

Solved

Lately, I have been building a large scale application that uses a lot of separate Vuex modules. Let's take a look at one of them (e.g. support-chat). Support chat is located on it's own separate p...
Decasyllabic asked 13/11, 2019 at 21:10

4

Let's assume we have some array of objects, and these objects never change. For example, that may be search results, received from google maps places api - every result is rather complex object wit...
Removable asked 1/6, 2017 at 12:5

3

Solved

I've manage to test Vuex getters that are isolated from other code. I'm now facing some issues when a getter depends on other getters, see the following example: getters.js export const getters =...
Defamatory asked 18/4, 2018 at 20:32

3

Solved

I am used to using a global event bus to handle cross-component methods. For example: var bus = new Vue(); ... //Component A bus.$emit('DoSomethingInComponentB'); ... //Component B bus.$on('DoSome...
Pricillaprick asked 15/3, 2017 at 23:57

5

It's been hours that I'm trying to get the id of the selected option in v-select, but it returns me the object not the id. Is there any way to get only the Id (object Id) of the selected option? I...
Diseased asked 21/10, 2018 at 23:57

4

I'm trying to add or update an object in store with Vuex. import Vue from 'vue' import Vuex from 'vuex' Vue.use(Vuex) export default new Vuex.Store({ state: { userData: {} }, mutations: { AD...
Undeviating asked 15/12, 2018 at 14:30

5

Solved

Is there a way for a dispatch/action to call a getter inside of it? mutations: { setData(state, data) { state.data = data; } } actions: { sendDataToServer({ commit }, payload) { // call gette...
Kiernan asked 28/8, 2018 at 1:38

© 2022 - 2024 — McMap. All rights reserved.