ture">Structure</a></h3>
<p>Components are a mechanism to encapsulate parts of a view to make code easier to organize and/or reuse.</p>
<p>Any Javascript object that has a view method is a Mithril component. Components can be consumed via the <a href="hyperscript.html"><code>m()</code></a> utility:</p>
<pre><code class="lang-javascript">var Example = {
    view: function() {
        return m(&quot;div&quot;, &quot;Hello&quot;)
    }
}

m(Example)

// equivalent HTML
// &lt;div&gt;Hello&lt;/div&gt;
</code></