I'm working on vuejs frontend with 'step wizards' and the display for each steps depends on the value saved on each step.
Meaning on each next/back button I'm doing a database post.
One solution could be using the mounted and calling an axios get to populate my form variables which will definitely solve my issues. But again will need to change and do a lot of
this.variable1 = response.data.variable1
this.variable2 = response.data.variable2
this.variable3 = response.data.variable3
this.variable4 = response.data.variable4
So was wondering if we can change the VueJS props: ['var'], on server post since we have already used the prop object (user object).
Example VueJS
Vue.component('blog-post', {
props: ['user'],
template: '<h3>{{ user }}
<a href="#" @click="saveUser">Save</a>
</h3>',
methods: {
saveUser() {
axios call here
and must change the user object
}
}
});