Questions tagged [vuex]

Vuex is a state management pattern + library for Vue.js applications. It serves as a centralized store for all the components in an application, with rules ensuring that the state can only be mutated in a predictable fashion.

Filter by
Sorted by
Tagged with
0 votes
0 answers
21 views

Update Values of String Using Vue

I have an application I'm working on where a user can enter a search term and then choose filters to filter through the results from the search. When clicking the search filters button, a slide in ...
elke_wtf's user avatar
  • 907
0 votes
1 answer
30 views

How to store instance in Vuex

There is one Pixi instance available. I want to keep it in vuex but I have problems even if I use JSON.stringfy. I want to create an instance and use it everywhere in the vue project.
oguzcan's user avatar
  • 23
0 votes
0 answers
17 views

Vue-Router infinite loop with redirect route stuck

I'm trying to check authentication with in the route before loading. When I reach a route that needs to be authenticated, the checkRolePermission call gets stuck in an infinite loop and give error ...
Pradeep Kumar's user avatar
0 votes
1 answer
54 views

checkbox using v-for in vuejs

Now I'm having trouble selecting CheckBox. By me looping in the DataTable and adding a Checkbox to it. And I have stored it as an Array. What I want is when I select the left tick, I remove the right ...
nongtan's user avatar
0 votes
0 answers
35 views

Changing state in vuex store is slow

I have a vue single page app that accepts xml in a form of a string, parses it and creates clickable xml tree. Each node is it's own component with a xml path property. I allow user to right-click a ...
Michal Kroupa's user avatar
1 vote
0 answers
31 views

What's the best way to move logic outside of a Vue project?

I have a few projects that all use similar services and stores. I want to have a separate logic and connect all the projects to it. Is it possible???
Mohammad Imani's user avatar
-1 votes
0 answers
24 views

Is it possible to use VueJS stores with Symfony/ux-vue

My question here is quite simple and I searched a lot on the web but I can't find any answers : Is there a way of using VueJS stores like Vuex or Pinia inside a symfony application that use the ...
Tanguy Macé's user avatar
0 votes
0 answers
24 views

Javascript + Vuex issue: how to access a Vuex boolean in a `v-if`

While working in a team project, my teammates wish me to display a div only when a certain boolean is true. However, I do not know how to access said boolean in the html. App.vue: <template> &...
Sam's user avatar
  • 361
0 votes
0 answers
62 views

Vite Build Error with Top-Level Await in Vuex Store Initialization

I'm currently working on a Vue 3 project with Vuex and Vite. I have a dynamic import for Vuex modules in my store.js file. Here's the relevant code: import lastStringElement from "../utils/...
kbrdn1's user avatar
  • 1
0 votes
0 answers
50 views

How to fetch data when store is initialized?

I have a simple store that gets its data by fetch: export const useCatStore = defineStore('cats', { state: () => ({ cats: [], pending: true, error: undefined, }), actions: { ...
Mick's user avatar
  • 8,398
0 votes
0 answers
14 views

Modify Vuex store by Cypress

I have to test a page via Cypress, the page using data from Vuex store to initialize itself. The problem is that the store updates in the previous page, so I don't have the data set. Example store: ...
Serhii Iliushenko's user avatar
0 votes
1 answer
18 views

Can I set a RouterLink for an entire table's row?

Right now I have a method that, whenever a row is clicked, the clicked record's information is opened in a little window by pushing to the record route. This is kind of ok, but I would like the row to ...
Nono-Man's user avatar
0 votes
2 answers
47 views

Vue child component unreactive

In an application with a Vuex store, there's a getQueryParams getter which returns an object containing the parameters being passed to a database query. If there are any parameters (i.e. the user has ...
knirirr's user avatar
  • 2,150
0 votes
0 answers
31 views

Get Result from apollo client error undefined

I'm trying to use the result I'm getting from my apollo client. but it keeps giving me error of undefined although the request send was success in network. It means I cannot get access to the result ...
sanaz baghban's user avatar
0 votes
0 answers
32 views

How to know the types of a getters in vue file?

I have some getters.ts file, when I use that getter inside the .vue file, the type of that getters is being lost, and it says type:any. Is there a way I can know the type of a getters inside the Vue? ...
Adinai Zhamangulova's user avatar
0 votes
0 answers
29 views

Cannot read properties of undefined (reading '$store') when deploying

I am creating a Vue app and using Vuex store. I am using the store in my navbar. When I run locally using npm run serve, the navbar shows and everything works fine. However, when I deploy it using ...
chulin's user avatar
  • 5
0 votes
0 answers
22 views

What is the best way to optimize Vuex or other methods to improve the initial loading speed of the backup history interface?

I do web front-end development in a backup company, now to solve a front-end performance problems, such as tens of thousands of history in the backup job history opened very stuck, mentor told me that ...
hzqsns's user avatar
  • 1
0 votes
0 answers
38 views

Vue3 - Issues adressing attributes from ProxyObjects returned from Vuex´ store

Repository: https://github.com/ElTruHTML/vocabtrainer_vue Within a part of my TopicCardES.vue Component i use a computed method to show an object: TopicCardES.vue/template: <p>{{ topicName }}<...
Kamedin's user avatar
0 votes
0 answers
37 views

Vue seems to "forget" Vuex States

I am working on an application with a login area. There are three routes at the moment: "/" Landing page, accessible for every not-logged user Component set in vue-router: TheIndex.vue &...
Kamedin's user avatar
-3 votes
1 answer
48 views

Vue js fetch data

I have a app VUE JS I face a problem in the navigations bar the navigations bar containt a image user if i click in the image user profile take me to profile but if i navigate in to another user ...
Si mo Id's user avatar
0 votes
1 answer
75 views

Vue reactivity bug: vue3, vuex4, class components (vuex-class-modules), inversify

I'm in the process of upgrading a vue2 project to vue3 which comes with the fun of upgrading most of the dependencies. I'm nearly done with the upgrade, but I am getting some weird bugs with state and ...
Jordan Jones's user avatar
0 votes
0 answers
28 views

vue3: how to add vuex files to vue-docgen-cli generate?

I'm trying to add documentation for the store, I found an example (https://github.com/vue-styleguidist/vue-styleguidist/tree/dev/examples/vuex) and want to adapt it to Vue3 docgen.config.js module....
Eric Flat's user avatar
1 vote
0 answers
56 views

Make Axios to pass and send cookies in its requests automatically

I want to pass authorization token automatically so I don't have to do it every time I send a request. I am using Laravel and Sanctum to handle API and tried to follow everything that is suggested in ...
googerdi's user avatar
0 votes
0 answers
51 views

Vuejs Memory Leaks - runaway vue components?

I have a large vuejs application (vue 2), built using vue CLI, that has recently started to run very slowly and then crash. I've been diligent about using the beforeDestroy() lifecycle hook to delete ...
Greg Fielding's user avatar
0 votes
1 answer
25 views

Vue3/Vuex - Component not reflecting state change when using destructuring assignment

I am using Vue 3 with Vuex. I am unable to get Vue to react to a change in state when mutating the state via destructuring assignment. Though, I am able to get Vue to react when I change state via a ...
Sam Britt's user avatar
0 votes
0 answers
47 views

Difference between axios response and network response

I have an issue with an axios call, here is the result of my network tab : I log the response immediatly after axios response : Here is the result of the console log : As you can see the scope....
Adri's user avatar
  • 265
0 votes
1 answer
65 views

vuex $store is not defined on cypress component testing [closed]

Currently I am trying to do component testing with vue and using vuex as state management and when run test case on mount the component I got the error stating cannot read properties of undefined like ...
Vatanak's user avatar
0 votes
1 answer
19 views

Vue & Vuex: no re-render after object key value mutation

I'm using vuex store value in front side ...mapGetters({ value : 'store/value' }); I'm facing a very strange situation: If I update de store value like this then it re-renders and updated value ...
Alin's user avatar
  • 265
0 votes
0 answers
29 views

Data on navbar only appears after refreshing

Im using vuex for my logIn, but it isnt loading after the callback, and i need to refresh the page My App.vue axios.get(process.env.VUE_APP_API_URL + '/api/', config).then((res) => { this.$...
user22623192's user avatar
0 votes
0 answers
29 views

How can I handle all vue js routes start with "/admin" or "/user"

In Laravel we write below: Route::prefix('/user')->name('User')->group(function() { // Our Routes }); in Vue Js, when I searched I couldn't find anything. please if someone knows about it, tell ...
MEHRDAD DASHTI's user avatar
0 votes
0 answers
40 views

How corectly import Vue in store file?

Why do I get this error in my console from the code below? Uncaught SyntaxError: The requested module '/node_modules/.vite/deps/vue.js?v=338c01cb' does not provide an export named 'default' (at index....
Jahongir Islamov's user avatar
1 vote
1 answer
259 views

Google Pay is not working on edge and Firefox in mobile devices And its working fine in desktop for all the browsers

I have worked on Google pay by using VueJS. and its working fine in all the web browsers but not working in mobile browsers like edge and firefox and working in chrome. When we click on "...
GVR's user avatar
  • 99
0 votes
1 answer
37 views

Vue.js component updates one store state variable and doesn't another

I'm writing a Vue 3 app using Vuex and Composition API. I've run into such a problem. A component displays elements depending on the state of two store state variables. One is an array and the second ...
Rico's user avatar
  • 184
1 vote
2 answers
67 views

How to test a watch on a computed property linked to a store getter, with jest and vue-test-utils?

I have a Vue component. My component have a computed property that refer to a getter of a vuex store. I use a watch to perform some action when this getter is updated. I want to test the watch using ...
Roman Diez's user avatar
0 votes
0 answers
359 views

Vuejs 3 vite with module federation share store between modules

We want to create an application and want to spilt it into modules with the help of module federation. The idea is that each module can live alone (without the host). For this requirement, we have to ...
Dom's user avatar
  • 503
0 votes
1 answer
38 views

Sorting in Vue and Vuex

I'm trying to get my new tasks to sort either by priority or most recent. I migrated the original project from vue and added vuex in for practice and it no longer works. import '@/assets/main.css' ...
Colton Skiera's user avatar
0 votes
0 answers
124 views

runtime-core.esm-bundler.js:41 [Vue warn]: Property "tasks" was accessed during render but is not defined on instance

I'm new to stack so pardon my etiquette. I'm currently learning Vue and Vuex for a job interview and was tasked with building a todo list. When I converted everything over to Vuex, the input for new ...
Colton Skiera's user avatar
0 votes
0 answers
9 views

How can I listen for an action performed on the store triggered by one component on another component using vue and vuex?

Component 1: <template> <button @click="restartForm">Perform Action</button> </template> <script> export default { methods: { ...mapActions('form', [ ...
giuliakhan's user avatar
0 votes
0 answers
34 views

Cannot use 'in' operator to search for 'path' in undefined not getting solved

i am always getting error "Cannot use 'in' operator to search for 'path' in undefined" i checked several blogs, it shows that i am doing spell mistake in router file, but even after ...
nmn124's user avatar
  • 1
0 votes
1 answer
52 views

Nuxt3 Middleware - Access VueX stores

I'm migrating a Nuxt2 app to Nuxt3. In a middleware i access a store state using 'context' like: export default function (context) { const userName = context.store.state.common.auth.user } In ...
Cesar Bhering's user avatar
0 votes
0 answers
13 views

errors trying to commit to vuex store

im stuck. i was following a tutorial to add a simple login system for a school project. but im stuck when the vuex this.$store.commit(stuff) returns this error Cannot read properties of undefined (...
Casper Veneman's user avatar
0 votes
0 answers
24 views

Vue JS, disable radio based on conditions

I have 2 buttons, 1 to create an ungraded quiz, and one to create a graded quiz this is the one to create an ungraded quiz <additional-quiz-button quiz-type="ungraded" ...
amrabat26's user avatar
0 votes
1 answer
32 views

how do I clear the v-model in the child component from the parent?

Please help me. I am trying 10hours in a row and doesn't work. I want when i clicked in @click="cleanDataForm" in Parent Component => v-model text in Child component will "" . ...
VueFrontend's user avatar
0 votes
1 answer
39 views

how to equate a getter from vuex to a variable from another component in vue 2 when you click on the button?

how, when you click on the button, an action was sent from vuex and equate one of the data properties with a getter from vuex ? <template> <div id="app"> <div ...
VueFrontend's user avatar
0 votes
1 answer
36 views

Vue3 Vuex Vue-route state seems to be undefiend

EDIT: ChatGPT had a solution for me. Apparently, the keyword "this" in the router refers only to the router itself and not the entire Vue app. After I included the store in the router it ...
De0x95's user avatar
  • 11
0 votes
1 answer
27 views

vue v-for does not update when vuex getter returns a new array

I am trying to create a reactive array that is displayed to the screen using a v-for. The array is stored in a vuex state array and is retrieved by the vue component using a vuex getter. Inside a ...
Jtrom2021's user avatar
0 votes
2 answers
182 views

how to upload an image to folder src/assets in vuejs

how to upload images to the src/assets folder in vuejs because now I want to upload it to my desired folder to test before I can use a real server. Please help me to solve this problem. I want to ...
nongtan's user avatar
0 votes
1 answer
25 views

Vuex (Vue3) unable to transmit payload

I have removed the methods that are not involved in the case for a more concise display. Need to return the count value for the object with the specified id. When I pass a valid id to counter, the ...
Hopex Development's user avatar
0 votes
0 answers
24 views

Vuex migrating a state property to another type under a feature flag

I have an auth vuex store It has a Cognito user export interface AuthState { user: CognitoUser } However, I'm trying to migrate the user to be a custom user export interface User { username: ...
David Meléndez's user avatar
1 vote
2 answers
99 views

Why scoped slots aren't working in vue js 3?

Why scoped slots aren't working in vue js 3 ? I'm returning an object with v-for loop but the specialty field isn't visualized. I think I have an error. And the console is empty I'm expecting to ...
bob's user avatar
  • 33

1
2 3 4 5
156