7,716 questions
1
vote
0
answers
46
views
How do I specify to WebStorm the canonical definition of the Vuex store?
Problem
I have a Vue project that uses Vuex for state management. Parts of the Vuex store are often mocked in unit tests (Vitest).
When Vuex stores are defined in both the main production code and in ...
0
votes
0
answers
30
views
Vue 3 Payment Success Page API Called Twice in Production After Stripe Redirect
I'm building a Vue 3 SPA with Vuex and Vue Router. On my Payment Success page, I call an API to assign purchased drinks:
created() {
this.buyDrink()
},
methods: {
buyDrink() {
const payload = ...
0
votes
2
answers
44
views
Getter from getter with vuex and Typescript
Trying to upgrade a project that is a couple of years old that uses vuex as store to the latest version of Vue3 with Vite and Typescript.
Now stuck on an issue with getters calling other getters. This ...
0
votes
0
answers
50
views
How to setup a singleton store/event bus for micro front ends monorepo with Vue2, Vuex, Vite?
I have this structure which every feature will be treated as a mini app, they will be bundle as separated scripts (based on vite-feature.config) to ready for load as needed on an external app.
They ...
1
vote
1
answer
135
views
Computed property lack of reactivity for deep nested object
EDIT01: I'm using "nuxt": "^2.16.0" with "@nuxtjs/composition-api": "^0.29.2".
I'm have been trying for days to figure this out but still dealing with this ...
0
votes
0
answers
74
views
"NetworkError when attempting to fetch resource" with vue router 4, vue 3 and vuex 4
after an update, going from ‘vue js 2’ to ‘vue js 3’, ‘vue-router 3’ to ‘vue-router 4’ and ‘vuex 3’ to ‘vuex 4’, I'm trying to fix my code so that it all works with Laravel.
This code worked before ...
0
votes
0
answers
83
views
How to use VueX 3.6 mapActions in vue 2.7 script setup
we're using VueX 3.6 with Vue 2.7. The project is old We can't go to Vue3. For new components, we're trying to use script/setup for new components. How to use VueX mapper functions in this situation? ...
1
vote
0
answers
155
views
How to migrate a boot/axios.ts file in a Quasar Vite project with Vue 3 and TypeScript?
I'm migrating a project from Quasar CLI to Quasar Vite and facing challenges with the boot/axios.ts file.
In the old Quasar CLI setup, the boot file for Axios looked like this:
import { boot } from '...
0
votes
0
answers
42
views
ERROR in ./node_modules/vuex/dist/vuex.esm-bundler.js vue-app
The app runs properly in npm reun electron:serve while running the command npm run build and npm run electron:build these error occurs
error in ./node_modules/vuex/dist/vuex.esm-bundler.js + 5 ...
0
votes
0
answers
36
views
Registration causing too much recursion
when trying to register a new user with a specific role I get too many recursion errors
main.js
import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './...
0
votes
0
answers
25
views
Can't confirmEmail VUEX
When I verified my e-mail already, the checkboxes in the local store don't change.
**** VUEX****
async confirmEmail({ commit }) {
try {
const user = auth.currentUser;
if (user) {
...
1
vote
0
answers
790
views
Pinia Store caching state values
I face an issue with my Pinia store and its router guard. When I go through the 'logout' function that basically does the following, everything comes into place.
The logout function in auth.js Pinia ...
0
votes
0
answers
38
views
Vuex state not updating from fetch
const fetchCartItems = () => {
store.dispatch('cart/fetchCartItems');
};
const cartItems = computed(() => store.getters['cart/cartItems']);
console.log('Products is : ', cartItems.value);
...
-1
votes
1
answer
704
views
Failed to scan for dependencies from entries: index.html" Error after Running npm run dev
I am encountering an issue while trying to run my Vue.js project with Vite. After executing the command npm run dev, the server fails to start, and I receive the following error:
VITE v5.4.3 ready in ...
0
votes
0
answers
61
views
Await dispatch does not seem to be working (VueX)
I have functions createSwipe, fetchUserSwipes, and fetchSwipedUserSwipes. I call fetchUserSwipes and fetchSwipedUserSwipes inside createSwipe using these:
await dispatch('fetchSwipedUserSwipes', ...
0
votes
2
answers
112
views
Vue 3 upgrade props are passed but not show in the component
I have following Vue 3 component image-template-row-item which has the prop templates-types
which is defined in the component in the props:
now this prop is always passed as undefined to the ...
0
votes
1
answer
64
views
Why are my environment variables explicitly visible in my Vue application through Google Chrome Inspector, and not obfuscated?
Hello everyone,
I have built a Vue app, and when I build the application using npm run build, the app builds successfully. However, when I look into the Google Chrome inspector, I notice something.
...
0
votes
2
answers
55
views
Vuex mutation does not return the latest value of the state
Currently I am working on a functionality where mutation updateConversationBasedOnAssignedUser updates the state current_action.
updateConversationBasedOnAssignedUser uses async/await call using Axios ...
1
vote
0
answers
341
views
Why are the handler values different for variables assigned reactive data within variables declared with computed() in Vue.js?
I am working on a project using Vue.js. In the code below, ListDataList is declared as a computed property, so it is called whenever the reactive data store.getters['management/banners'] assigned to ...
0
votes
0
answers
89
views
Facing issues in nested routes in Vue-3
I am creating a simple CRUD application for users based on different roles, but I'm facing issues with nested routes and component rendering. I have carefully reviewed their official documentation, ...
2
votes
0
answers
781
views
Nuxt 3 With Vite Production Issue: Works in Development but Not in Production
I'm experiencing an issue with my Nuxt 3.6.5 application. The app runs perfectly with npm run dev, but when I build and start it using npm run build and npm run start, it doesn't work as expected.
...
0
votes
0
answers
42
views
Computed property from VueX store does not update component
I have a component that lists entries of an array of posts (it's stored as projects in the store). When created the component dispatches a action to the store that fetches the data and mutates the ...
1
vote
1
answer
42
views
Computed property that relies on Vuex stored prop not updating?
When reservation is updated (which it is, I can see it change in the template through things like {{ reservation.id }}) the following computed property (reservationHashedId) is not... Why?
const ...
0
votes
1
answer
50
views
Vuex and Vue Router - double condition on beforeEnter not working
I have double condition in beforeEnter and nobody can enter to right place. Is there a limit in conditions or what? :(
my code in the router file:
const routes = {
path: `${routerConfig.preRoute}/...
1
vote
0
answers
537
views
Use Vuex and Pinia Store in Quasar
I am working on a Quasar app that uses Vuex. I need to use some modules that use Pinia so I would need to instantiate Pinia on my app as well.
My problem is, how do I instantiate both Vuex and Pinia ...
0
votes
0
answers
210
views
How to use vuex in vite
Now I have a problem using vuex in vite. My problem is caused by when I run dev and it gives an error vuex unknown but when I press save file CRUD/get.js it doesn't error. It only gives an error when. ...
0
votes
1
answer
47
views
Vue2 doesn't see updates of object in expanded table vuetify
I have a problem with reactivity in Vue2
I have an array of objects in Vuex, which are displayed in v-data-table, inside each object I have an array that is filled with data when row expanded, I want ...
0
votes
0
answers
91
views
Vuex module does not provide an export named createStore
Iam importing vuex from cdn, following the instructions. I do this:
import { createStore } from "https://unpkg.com/[email protected]/dist/vuex.global.js";
and I get an error in the console that the ...
0
votes
1
answer
102
views
Keep filter values in previous page when navigating
This is what looks like to be a very simple matter but for some reason I couldn't find a clear answer on how to do it.
I have 2 pages : users page that contains a list of users displayed in a v-data-...
0
votes
0
answers
17
views
Nuxtjs error - Do not mutate vuex store state outside mutation handlers
I'm using vedraggable, so I have two draggables on the page, one to clone and the other that just receives the clone.
The draggable that receives has a @change, calling a method that changes a vuex ...
0
votes
1
answer
136
views
how to spy/stub a function and stub an action Vuex in the component vue3 composition api
my stack:
cypress
@vue/test-utils
component in vue3 in composition api (<script setup />)
My test, i would like to spy a method inside a component, and spy action vuex inside a method in ...
-1
votes
1
answer
40
views
vuex store management overwrites the table in ionic [closed]
Code: https://github.com/cbsmerveguel/ionicblank
Hi all,
I am very new at vuejs and vuejs with ionic. I wanted to give it a try with a master-detail view, in which at master page a table will be ...
0
votes
0
answers
40
views
How do I understand the Vuex docs?
Here's the link to a paragraph from the Vuex docs:
To do so, declare custom typings for Vue's ComponentCustomProperties by adding a declaration file in your project folder:
How am I supposed to know ...
0
votes
2
answers
116
views
Troubleshooting: Why Doesn't My Function Enter the Try/Catch Block?
While working with Vuex, I encountered an issue in a particular section where I'm making a GET request to my API. Despite knowing that the response should be a 404 error, my code doesn't seem to enter ...
1
vote
1
answer
72
views
Testing Vuex reducer/mutation in Vue3/Vue-test-utils
I am in the process of migrating to Vue3, so please excuse me for not just using Pinia. I have a reducer like this:
export const mutations: MutationTree<UiState> = {
SET_LOADING: (state, ...
0
votes
0
answers
39
views
Make Vue3 detect when a key is updated within a dictionary, which is in an array [duplicate]
<tr v-for="(object,index) in watchingArr" :key="index">
<span>{{ object.1 }}{{ object.2 }} {{ object.3 }}</span>
</tr>
I am aware that Vue3 can only ...
0
votes
0
answers
63
views
Vuex: Use deferred promises in store
I have multiple Vuex modules which should access a single value (feature flag bool) which comes from an API. I want this API value to be loaded lazily, meaning just when the first action inside of ...
0
votes
1
answer
73
views
Last visit page tracking with vuex
I have a vue application and I want somehow save or memorize the last visited page with vuex-persistentstate. What I want is: I have 3 pages for example A,B,C and all three leads to Page D and on Page ...
1
vote
0
answers
129
views
How do I share Vuex state management between host and remote using the webpack5 module federation function?
There is project A, which is the host, and project B, which is remote.
(This is a vue-based project)
Each project manages state with Vuex. How should I manage state between projects?
After exposing ...
0
votes
1
answer
1k
views
How to use VueX 4 in nuxt 3 project
I am fairly new to Vue, but had started my project in Vue 3 when after I realized that I wanted to optimize for SEO, so I decided to move to Nuxt. However I have found it a bit challenging to move my ...
0
votes
1
answer
156
views
Is there a way to pass attributes to Vue JS computed getter/setter?
I am trying to use computed property to bind my input fields with the Vuex Store.
So I have Data Streams and each of them have specific input fields, they aren't fixed but managed from the admin ...
0
votes
1
answer
77
views
onSucess returns undefined for metadata param when inside Vue view but not inside component
I have a vue component that is for Plaid Link that calls a function/action in my Vuex store named onSuccess that should call my backend API to exchange the public token for an access token and send ...
0
votes
0
answers
73
views
Vue.js - Issue with Menu Component and Event Handling
I'm currently working on a Vue.js project and have encountered an issue with a custom menu component. The menu is supposed to handle sorting types, and I'm using it in conjunction with a method (...
0
votes
0
answers
44
views
unknown action type vuex
I'm using vuex modules and I'm trying to call Actions but I get an error. However, everything works if left in the vuex global storage.
import { createStore } from 'vuex';
export default ...
0
votes
1
answer
37
views
Vue watch issue
I have two pages and I can change the same vuex value from both of them
On the first page(main page) I watch the vuex value and send a request when it changes
const selectedPokemonType = computed(() =&...
-3
votes
1
answer
73
views
should actions in state management modify state directly? [closed]
I'm using pinia with vue3, but this question applies to all state management structure.
in actions, should I return the result then overwrite(or mutate) state or just modify state directly as a side-...
2
votes
0
answers
1k
views
Is there a way to listen watch / subscribe in Vue composition + Pinia from a different component than which tiggered the state change
Technologies : Vue, Pinia & Composition API
I have a scenario which has 2 windows opened simultaneously for the same application.
Lets say there are 2 different Vue components (A & B) & a ...
1
vote
0
answers
2k
views
How can I properly setup a Loading screen in Vue3 and Vite?
I want to setup a Loading screen on App loading. I am currently using a Loading component and setting up its time interval to 2 seconds. However, that is not the proper way to set up a Loading screen. ...
0
votes
0
answers
129
views
Does watch() in Vue 3 behave differently in development vs production?
Just wondering if I've missed something or don't quite understand it, but I have this block of code that runs fine on development locally, but wont run on production.
watch: {
$route(to, from)...
0
votes
1
answer
195
views
Vuex data not saved with createPersistedState
Im trying save my vuex state when page refreshes , I used createPersistedState but the data still disappear no matter what
my store file :
import { createStore } from "vuex";
import ...