I have very common problem with upgrading to Vue 2.0
I am getting warning:
Avoid mutating a prop directly since the value will be overwritte
I'm not sure what exactly you want to achieve but I'll take two options out of it.
First one: It's all about getting rid of this warning.
data () {
return {
childVal: this.parentVal
}
}
Second one: You want to communicate between parent and child.
If I got it right, this is a basic example of an in a child component communicating with its parent.
Parent HTML:
{{ user }}
Parent JS:
data () {
return {
user: 'John'
}
}
Child HTML:
Child JS:
props: ['value']
Working example: http://jsfiddle.net/kf3aLr1u/
You can also read more about it in the docs https://vuejs.org/v2/guide/components.html.