# canMount

### Returns

**boolean** True if the component should mount.

### Example

{% tabs %}
{% tab title="JavaScript" %}

```javascript
const Example = new class extends Component {
    canMount() {
        return false;
    }
    mounted() {
        console.log("This life cycle method will never fire.");
    }
}();

Example.mound(document.getElementById("root");
```

{% endtab %}

{% tab title="HTML" %}

```markup
<div id="root"></div>
```

{% endtab %}
{% endtabs %}
