title: How to use ref on <component> in vuejs?
body: <p>I am having two independent VUE components and I want to communicate between them.</p>
  <p>In the first component, I am using <code>&lt;component&gt;</code> and added ref to it.</p>
  <pre><code>&lt;component ref=&quot;dynamicComponent&quot;&gt;&lt;/component&gt;
  </code></pre>
  <p>and in that above dynamic component, there is a method(suppose <code>dynamicMethod</code>) and I want to call that method from second component.</p>
  <p>So for that, I am using below code:</p>
  <pre><code>this.$root.$refs.dynamicComponent.dynamicMethod();
  </code></pre>
  <p>But I am getting <code>this.$root.$refs</code> a blank object. How can I call that method.</p>
  <p>Any help would be appreciated.</p>