# Mounting a Component

A component instance won't render until its `.mount()` method has been called.

### Arguments

<table><thead><tr><th>Name</th><th>Type</th><th width="273.66666666666663">Description</th></tr></thead><tbody><tr><td>Element</td><td>DOM element or a selector string</td><td>The container element that the component will be mounted to.</td></tr></tbody></table>

{% hint style="info" %}
If no element is provided the component will be mounted to the `<script>` elements parent element. This can be useful if you could like to encapsulate your code embeds within your UI components.
{% endhint %}

### Example

<pre class="language-html"><code class="lang-html">&#x3C;script>
<strong>  $app.createComponent('my_component', myComponentStore).mount('#myComponent');
</strong>&#x3C;/script>
</code></pre>
