Skip to content
Advertisement

Tag: vuejs2

Infinite repeated while using v-for in vuejs

I have an API to get list of books, in each book I have author ID. I also want to get author name from that ID through another API (get author), so I use v-for to get items in list of book. Each item I call getAuthor(authorId) function but it repeats infinitely. Does anyone know what the reason is? My

VueJS : Unhandled error with simple script

Still learning VueJS, I just wanted to know why when I click on my button my function selection doesn’t work. All the rest in the created() is fine and shows the correct , but in my methods section, just to show a console.log on a click event I have this error : [Vue warn]: Unhandled error during execution of native

Does the store object in vuex fall through to leaf components?

Following the docs: https://vuex.vuejs.org/guide/mutations.html#committing-mutations-in-components and the video tutorial: https://scrimba.com/scrim/ckMZp4HN?pl=pnyzgAP it’s not clear (to me) whether store is visible in nested/child components present in the component that includes it. Answer From the docs you’ve linked (emphasis mine): You can commit mutations in components with this.$store.commit(‘xxx’), or use the mapMutations helper which maps component methods to store.commit calls (requires root store injection)

Vue.js component method on creation

I’m new to Vue and I’d like to make an AJAX call every time my component is rendered. I have a vue component lets say “test-table” and Id like to fetch the contents via an AJAX call. There are many such tables and I track the active one via an v-if/v-else-if etc. Currently I have a cheaty solution: in the

Advertisement