[Vuejs]-How do I update my parent component data whenever my child component adds new data

0👍

First => To send data from child to parent :
in child component use in your script

this.$emit('your-event-name',value) 

and in parent component use:

<child-component
          @your-event-name="event-handler"
        />

Second => to send data from parent to child:
in parent compenent use prop “:”

<child-component
          :propName="value"
        />

in child component use :

props: ["propName"]

Leave a comment