vuex Questions
4
Solved
Quick story of my problem:
Absolutely no data is stored in my vuex state when the page loads
If the user is logged in(or has info stored in window.localStorage and therefore gets auto logged in) ...
Breazeale asked 29/3, 2018 at 5:24
2
I'm having a problem regarding the vuex action handler and ESLint rules
this action code will flag ESLint as error if the variables are not used and if the object is empty
actions:{
handler:({co...
4
Solved
I got vujes typescript project and in vuex store i got something like:
async getUserProfile ({ dispatch, commit }: any) {}
Well i dont want any because that suck and you dont have help/autocompl...
Situation asked 16/5, 2018 at 15:54
2
I have a project using nuxt universe SSR. I fetch data on layout using fetch method thet trigger store action dispatch. But it doesn't work at all...
Here's the code. This is default layout file:
i...
Panther asked 21/7, 2020 at 15:38
7
I have a vuex file with a growing mass of mutators, but I'm not sure of the correct way of splitting it out into different files.
Because I have:
const store = new Vuex.Store({ vuex stuff }) and ...
4
How can I access my store from my plugin? Console returns undefined.
import store from './store';
export default {
install(vue, opts){
Vue.myGlobalFunction = function(){
console.log(store);
}
...
1
Solved
According to the Nuxt docs, I should be able to access $config from within my vuex store:
"Using your config values:
You can then access these values anywhere by using the context in your page...
5
Did anyone tried to use boostrap-vue in combination with vuex?
I'm having hard time calling modals and toast from vuex actions.
Obviously I can not use this from vuex store, therefore I can't use:...
Miyamoto asked 11/8, 2019 at 7:12
1
I'm happy to join the StackOverFlow community.
I am new to web development and have billions of questions.
My question will concern a fetch request in javascript.
I'm trying to extract the data (us...
Triptolemus asked 31/3, 2021 at 4:39
1
Solved
7
Solved
Overview
In Vue.js 2.x, model.sync will be deprecated.
So, what is a proper way to communicate between sibling components in Vue.js 2.x?
Background
As I understand Vue.js 2.x, the preferred method...
Hodgkinson asked 27/7, 2016 at 14:40
2
Solved
I'm building out a vuetify/nuxt frontend for the first time, and I've moved my v-navigation-drawer component out of the default.vue layout, and into it's own component, so that it can be reused in ...
Lindane asked 22/11, 2017 at 19:36
1
Solved
I'm building the logic for an 'undo delete' - action. For that, I'm using an Event Bus to send an event to two unrelated components like so:
Undo.vue:
EventBus.$emit(`confirm-delete-${this.category...
Myrlmyrle asked 25/2, 2020 at 9:6
5
Solved
I developing nuxt.js app. And point is login & logout.
We will develop a login to the JWT system.
You must remain logged in at vuex.
However, when I refresh the page, vuex is initialized.
...
Bagley asked 23/5, 2017 at 5:30
0
Hello developers I'm working with Ionic and Vue+Vuex in this app, but eventually, I can't access my state from my getters for some reason.
As usually the management state is settled for that purpos...
Ecthyma asked 12/3, 2021 at 10:56
1
Solved
So I have a /login route that renders the login view and I'm trying to make it so that if the user is already logged in, he gets redirected to another route. The problem is that when I type the url...
Healthful asked 11/3, 2021 at 21:35
6
Solved
I am creating a web app with Vue 2.x and Vuex 2.x. I am fetching some information from a remote location via an http call, I want that if that call fails I should redirect to some other page.
GET_...
Tatar asked 22/11, 2016 at 8:16
1
Lets say I have a simple Vuex state to hold a recipe:
const state = {
recipe: {
id: '',
name: "",
ingredients : [],
}
};
Is it a good practice to instead create a recipe class holding the s...
Frankie asked 25/11, 2018 at 17:28
2
Solved
I have created a Vue3 application using the Vue CLI to create my application with Vuex and Router. The application runs well.
Note: I followed this useful doc for the Vuex with Vue3 https://blog.lo...
1
Solved
I'm trying to handle 422 response from my API in case data is invalid when making an async Axios call.
In a component, I have a method like:
async saveChanges() {
this.isSaving = true;
await thi...
Prankster asked 19/2, 2021 at 21:41
2
I'm trying to test my 'Container' component which handles a forms logic. It is using vue-router and the vuex store to dispatch actions to get a forms details.
I have the following unit code which ...
Overby asked 30/5, 2018 at 21:29
3
Solved
In the Nuxt documentation (here) it says 'You can optionally break down a module file into separate files: state.js, actions.js, mutations.js and getters.js.'
I can't seem to find any examples of ...
Neysa asked 23/11, 2018 at 12:32
0
I'm willing to learn how to unit test a Vue application.
On the official documentation, they incite new comers to use Vue Testing Library instead of the official Vue Test Utils:
if you are n...
Dinger asked 7/2, 2021 at 11:18
1
Solved
I have a namespaced vuex store that returns an entry of the store based on the parameter of the current route.
import Router from '../../router/index'
const options = {
routeIdentifier: 'stepId'
...
Sigismondo asked 1/2, 2021 at 15:8
1
Is there a way to find how much size a state (object, array, etc) or a component occupies in memory.
In my current context, I need that to know if a specific state/component is very heavy (in term...
Subsidy asked 2/4, 2019 at 13:56
© 2022 - 2024 — McMap. All rights reserved.