title: VueJS process component or HTML using a function
body: <p>I understand how this works from the <a href="https://v2.vuejs.org/v2/guide/components.html#Base-Example" rel="nofollow noreferrer">VueJS Documentation</a>:</p>
  <pre><code>&lt;div id=&quot;components-demo&quot;&gt;
   &lt;button-counter&gt;&lt;/button-counter&gt;
  &lt;/div&gt;
  </code></pre>
  <p>And also this:</p>
  <pre><code>&lt;div id=&quot;app&quot;&gt;
    &lt;a v-on:click=&quot;loadElement(request, etc)&quot;&gt;Load&lt;/a&gt;
  &lt;/div&gt;
  </code></pre>
  <p>Is there any way to write the equivalent from a function and have Vue pick it up?  For example as this:</p>
  <pre><code>&lt;div id=&quot;app&quot;&gt;
    {{ writeComponent('component-name', etc) }}
    or
    {{ writeElement('loadElement') }} &lt;!-- which then writes the component above --&gt;
  &lt;/div&gt;
  </code></pre>
  <p>The reason for this is that in this context quite a few components might need to be written and writing it out in HTML would be cumbersome.</p>