lob/master/ospec">Ospec</a></li>
</ul>
</li>
</ul>
<hr>
<h3 id="description"><a href="#description">Description</a></h3>
<p>Activates a component, enabling it to autoredraw on user events</p>
<pre><code class="lang-javascript">var state = {
    count: 0,
    inc: function() {state.count++}
}

var Counter = {
    view: function() {
        return m(&quot;div&quot;, {onclick: state.inc}, state.count)
    }
}

m.mount(document.body, Counter)
</code></pre>
<p>To pass arguments when mounting a component use:</p>