vuex Questions
3
When I dispatch an action in App.vue component in mounted() lifecycle hook, it runs after other components load. I am using async/await in my action and mounted lifecycle hook.
App.vue file
methods...
Fellatio asked 9/1, 2021 at 5:40
1
This is the parent component I want to send bind :class to two child component
<TextInput
:icon="['fa', 'user']"
type="text"
placeholder="Name"
v-model.trim=&q...
Jonasjonathan asked 21/1, 2021 at 12:19
0
I'm on Nuxt 2.13 and I'm having an issue with window.__Nuxt__(function(a,b,c,d,.....)). I don't know if it will affect my SEO or not, but it's on my nerve and shows all my language file.
here is th...
Luzluzader asked 21/1, 2021 at 9:39
1
Solved
I have the following method in my Vue Component
loadMaintenances (query = {}) {
this.getContractorMaintenances(this.urlWithPage, query).then((response) => {
this.lastPage = response.data.meta....
Selah asked 18/1, 2021 at 22:2
4
Solved
In an action, I'm doing:
this.$cookies.set("token", response.token, "7d");
this.$cookies.set("UserId", response.UserId, "7d");
But alas $cookies is not defined.
Earreach asked 19/8, 2019 at 14:28
5
I'm beginner with Vues.js and i'm asking something about mapMutation method.
I want to pass parameters with this method but i don't know how.
I want to transform my two methods by using mapMutation...
1
Solved
form(@submit.prevent="onSubmit")
input(type="text" v-model="platform" placeholder="Add platform name...")
input(type="submit" value="Submit&...
Hypnogenesis asked 9/1, 2021 at 18:45
3
Solved
I have the following Navigation.vue component:
<template>
<div>
{{user.first_name}}
</div>
</template>
<script>
import { mapActions, mapGetters } from 'vuex'
e...
Fording asked 23/10, 2017 at 20:15
2
Solved
I want to access context variable to use the isMobile flag to select a different endpoint depending on the result. I could pass it on the dispatch from the component, but I know there should be one...
2
I have set up a Vuetify Navigation Drawer on NuxtJS using Vuex to handle the state of the drawer. Everything works fine except for one problem -- namely, that when I load the page on a desktop, the...
Sutra asked 28/11, 2019 at 14:32
3
Solved
I try to do a login via nuxt-auth module. As a response I get the token and then the user data is delivered. However, this.$Auth.loggedIn is false and this.$Auth.user is undefined. I have been figh...
Aldose asked 30/9, 2018 at 8:32
2
Solved
Is it possible to create a Promise that resolves once a variable in the global vuex store changes?
I have a variable that is initialized as null in the state store and will be populated via an asy...
Precocity asked 6/10, 2018 at 14:25
5
Solved
I have the following setup for my actions:
get1: ({commit}) => {
//things
this.get2(); //this is my question!
},
get2: ({commit}) => {
//things
},
I want to be able to call one action fro...
1
Solved
I can't understand why I'm getting this error. I am trying to use the Vuex store in a composition function but it keeps throwing me this error about inject (I'm not even using inject). My app makes...
Hyp asked 17/12, 2020 at 12:27
2
Solved
I have this Vuex module:
//modules/things.js
const state = {
firstThing: 'abc',
secondThing: 'def',
};
const getters = {
getFirstThing: state => state.firstThing,
getSecondThing: state =&g...
Deflection asked 5/12, 2017 at 4:36
2
Solved
I'm trying to show "locations" in a vuetify select component, but my current code renders "[object Object]" instead of Location 1, Location 2, etc.
My select component:
<v-select
:items="locat...
Unkindly asked 24/3, 2018 at 20:27
5
Solved
I have an array called cases in my vuex store.
I want to update the array with the new content when I update a few fields within an existing item in the array.
I thought I could do something like...
5
Solved
In my components I've been using:
this.$router.push({ name: 'home', params: { id: this.searchText }});
To change route. I've now moved a method into my Vuex actions, and of course this.$router no...
Skees asked 23/11, 2016 at 15:5
1
Solved
I'm trying to pass editTodo as props function from parent app.vue to child components ...
TodoItem.vue component there is a list Of Items and Time returns to main user input of newTodo and dateTime...
Consulate asked 12/11, 2020 at 14:35
2
I have a bunch of class binding statements:
:class="{active: isActive('status', status.id)}"
Here's the method referred to above:
isActive: function (param, value) {
if (!this.activeFilters.ha...
4
Solved
I have data, that loaded on page once before VueJS-application init, and this data will not change for all time while html-page will not reload (classic CGI application, not SPA). Data example:
co...
Girl asked 23/11, 2017 at 9:51
0
I am referring https://youtu.be/5lVQgZzLMHc?t=800 to build my first Vuex application. This is a 2018 tutorial so my main.js looks a bit different. I am using Vue 3.0.2 (as shown in Vue developer to...
Arcature asked 5/11, 2020 at 11:17
3
Solved
I have issue when Im using vuex.
I have getters in namespaced module and I cant figurę out how to get the data with Ii when Im passing some arguments.
this.$store.getters.feeders.getFeedersById(...
Neglect asked 23/1, 2018 at 11:13
1
Solved
I have several VueX actions (that run on the server only) and are dispatched from nuxtServerInit. They make HTTP requests to external services, which is slowing down the TTFB.
I would like to imple...
1
Solved
I'm building a simple app using nuxt + vuex. When commiting/dispatching I constantly get error "unknown action/mutation type: name". Also my mutations and actions don't display in vue dev...
Wormy asked 27/10, 2020 at 21:44
© 2022 - 2024 — McMap. All rights reserved.