Skip to content
Advertisement

Tag: vuex

Passing multiple parameters to Vuex action

I have the following method in my Vue Component I want to pass the parameters (this.urlWithPage, query) to my Vuex action as follows: The problem is that the first parameter url is returning a value but the second one query is returning undefined. My mutation is as follows: How can I get a value from the second parameter? Answer The

Vuex Store Object Child returns undefined, parent returns properly. Why?

I’ve seen some similar questions but they don’t seem to match my situation. When I log this.$store.state.account I get the expected result However, when I console.log(this.$store.state.account.user) the user object disappears! All of the nested properties inside user return undefined though they log perfectly fine above console.log(this.$store.state.account.user) This is the method inside my component calling the object this is the action

How to use function that return value inside a template? Vuex, Vue

I’m using a template to get data of a json file, I use “v-for” to print all data, for example: But I need use functions, year() to modificate this information and return and result, for example: The value {{ item.date }} print “2021-01-20” but I hope print “2021” using the function {{ year(item.date) }} Code function year() using javascript: I

How to use a method on page load? VueX

I’m learning Vue with Vuex, I made a method called ‘llamarJson’this method get a json data. I don’t know how to use it when the page load. I tried many ways but I could not find a solution. I’m using Vue and Vuex. Please, could you help me? That’s the code html: That’s the JS code: Answer you should use

did you register the component correctly? For recursive components, make sure to provide the “name” option. (found in ) VUE

I’m learning Vue with Vuex, I tried to do a component but appear this error: vue.js:634 [Vue warn]: Unknown custom element: actividadescomponent – did you register the component correctly? For recursive components, make sure to provide the “name” option. (found in ) error screen shot I tried many ways but I could not find a solution. That’s the code html:

Object(…) is not a function for Vuex Store

I’m in Vue 3, I started with adding a new Vuex.Store to vue, but I continuously get this javascript error. I also tried the same thing with createStore since I use Vue 3, but it’s still the same. What am I missing? Than I add to Vue as store: What am I missing? Complete error Answer If you are using

Advertisement