Answers for "how set function when props update in vue"

C#
1

how set function when props update in vue

export default {
  data(){
  	return{
    	result:[]
  	}
  },
  props:['res'],
    watch:{
        result(value){
            this.result.push(value)
        }
    }
}
Posted by: Guest on May-31-2021

C# Answers by Framework

Browse Popular Code Answers by Language