data is as follows. This data is
in vuex.all: [
{
userinfo: {user: "aaa", uid: 10001, text: ""}
}
]
{{item.userinfo}}
this allows you to output data in userinfo
, but {{item.userinfo.user}}
this makes a mistake Error in render: "TypeError: Cannot read property "user" of undefined"
later, I took the data of this all from vuex"s state and put it in data so that it could be fetched normally. Why did you report an error when you put it in vuex?
<div v-for="(item, index) in all" :key=index>
<div class="userinfo">
{{item.userinfo.user}}
</div>
</div>
computed: {
all () {
return this.$store.state.all
}
}