0👍
Axios returns a proxy of the object, then when you go through it you need an index, then I have solved it by equalizing,
links = res.data ==> Now links=res.data.links
now this works with v-for without problems.
- [Vuejs]-What's the lightest way to automate .vue file compilation without webpack?
- [Vuejs]-Adding a new child to a real-time Firebase database using Vue
-1👍
Have you tried:
<ul>
<li v-for="(data,index) in userStore.links">{{data[index].link}} - {{index}}</li>
</ul>
That way if userStore.links is an array, it will iterate through all items.
https://vuejs.org/guide/essentials/list.html#v-for-with-an-object
Source:stackexchange.com