Dynamic component click event in Vue
<p>I render Vue components using <code>v-for</code>:</p>

<pre><code>&lt;component
    v-for="component in components"
    :is="component.type"
    @click="myFunction(component.id)"&gt;
&lt;/component&gt;
</code></pre>

<p>Clicking on the rendered component doesn't fire the <code>myFunction</code> method. However, clicking a manually inserted component does:</p>

<pre><code>&lt;div @click="myFunction('...')"&gt;&lt;/div&gt;
</code></pre>

<p>How to correct this?</p>