Description
hi using submit review form latest review not comes . review is child component i pass reviews data through props.. when submit form then latest review not comes on form submit. thanks
View Code
when submit review using form then latest review not comes here it is my code
```
if(this.formdata.name && this.formdata.content)
{
axios.post(`https://press.escuela-ray-bolivar-sosa.com/public/api/user/review`,{
name : this.formdata.name,
content : this.formdata.content,
product_id : this.formdata.product_id,
rating : this.formdata.rating
},)
.then((response)=>{
this.formdata.name = null;
this.formdata.content = null;
this.getreviews = this.data.reviews;
this.reviewlength = this.getreviews.length;
this.$router.push({ name : 'book',params : {id: this.formdata.product_id} });
})
.catch((errors)=>{
})
}
```
on mounted this i call this show reviews
```
mounted()
{
this.getreviews = this.data.reviews;
},
this.data is prop and review component is child component reviews send through props
<review v-if="loading" v-bind:data="propsdata"></review>
```
this.data.reviews; have reviews but it not contain latest submitted review
0 Likes 0 Comments