title: vue emit event and receive in parent component
body: <p>Hi i have two component , I get response in one component and need to pass and push in the array of parent component. Below is my code. I have not received response.
  In <code>Userstatuscomponent.vue</code> I have few methods and whatever response I get there I want to pass this to <code>UserComponent.vue</code> and push it in users[] array. I think I have done something wrong. Please help me.
  UserComponent.vue</p>
  <pre><code>&lt;template&gt;
  &lt;div&gt;
          &lt;Status v-on:updateStatus=&quot;receiveResponse(userData)&quot;&gt;&lt;/Status &gt;
      &lt;div class=&quot;card&quot; &gt;
          &lt;div class=&quot;card-header&quot;&gt;
              &lt;div class=&quot;card-body&quot; v-for=&quot;user in users.data&quot; &gt;
  
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  &lt;/template
  
  
  &lt;script type=&quot;application/javascript&quot;&gt;
  import Status from '../components/UserstatusComponent.vue' 
  
  export default {
      data() {
          return {
              users: [],
          };
      },
      created() {
          this.getResult();
      },
  
      components: {
          Filter
      },
      methods: {
          getResult() {
              axios
                  .get(&quot;/api/result&quot;)
                  .then(response =&gt; {
                     
                          this.users = response.data;
                     
                  })
                  .catch(error =&gt; console.log(error));
          },
          receiveResponse(userData){
              this.users =  userData
          },
  //HERE I HAVE RECEIVED THE EVENT and update users array
          receiveResponse(user){
              this.users = user
          },
   
      }
  };
  &lt;/script&gt;
  Now I have some method in UserStatusComponent and I want to pass the response from this component to UserComponent.vue
  
  UserstatusComponent.vue
  &lt;template&gt;
              &lt;div class=&quot;&quot;&gt;
                          &lt;a
                              @click.prevent=&quot;updateOne&quot;
                              &gt;update one&lt;/a
                          &gt;
                          &lt;a
                              @click.prevent=&quot;updateTwo&quot;
                            
                              &gt;update two&lt;/a
                          &gt;
                         
                         
                      &lt;/div&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
  &lt;/template&gt;
  
  &lt;script&gt;
  export default {
      data(){
          return{
              
          }
      },
      updateOne() {
              axios
                  .get(&quot;/api/result&quot;, {
                      params: {
                          status: &quot;bad&quot;
                      }
                  })
                  .then(response =&gt; {
                      this.$emit('updateStatus',response.data);
                  });
          },
          updateTwo() {
              axios
                  .get(&quot;/api/result&quot;, {
                      params: {
                          stauts: &quot;good&quot;
                      }
                  })
                  .then(response =&gt; {
                      this.$emit('updateStatus',response.data);
                  });
          },
          
  }
  &lt;/script&gt;
  </code></pre>