4π
β
In this case you will inherit the default value:
<pair></pair>
In this case you will always inherit the value of selectedExchange, even if itβs null or undefined:
<pair :selectedExchange="this.selectedExchange"></pair>
So, in your case, you have to handle the default value on parent component.
This should work:
export default {
name: 'App',
components: { exchange, pair, trades },
data(){
return{
selectedExchange: 'acx' // default value
}
},
methods: {
updateExchange(updatedExchange){
this.selectedExchange = updatedExchange
}
},
};
π€Fab
Source:stackexchange.com