Answer the question
In order to leave comments, you need to log in
What is the correct way for seo to get data in nuxt?
Good afternoon, tell me please, is it right for SEO in this way to render data in nuxt
<div class="item" v-for="(item, index) in items" :key="index" ></div>
computed: {
items(){
return this.$store.state.store.products
}
},
mounted() {
this.$store.dispatch('store/getProducts')
}
Answer the question
In order to leave comments, you need to log in
create an empty array A
inside the loop :
create an empty array B
add key => value pairs of your data
to array B assign array B as a new value in A
after the loop you can encode A into json, get what you want.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question