Answers for "pass value as prop and get updated value back vuejs"

1

vuejs push data update parent

<!--
 From the child component, you want to do an "emit".
 This tells the parent to run the callback specified
 in the child component reference. Psuedo code:
-->
<parent>
  <child @send="receive"></child>
    
    methods: {
      receive(childData) {
        console.log(childData); // "Hello World"
      }
    }
</parent>

  
<child>
    <button @click="send">Click Me</button>

    methods: {
      send() {
    	Vue.$emit('send', 'Hello World');
      }
    }
</child>
Posted by: Guest on May-13-2020

Code answers related to "pass value as prop and get updated value back vuejs"

Browse Popular Code Answers by Language