omponents</a></h4>
<p>Functionally minded developers may prefer using the &quot;closure component&quot; syntax:</p>
<pre><code class="lang-javascript">function closureComponent(vnode) {
    // vnode.state is undefined at this point
    var kind = &quot;closure component&quot;

    return {
        view: function() {
            return m(&quot;div&quot;, &quot;Hello from a &quot; + kind)
        },
        oncreate: function() {
            console.log(&quot;We&#39;ve created a &quot; + kind)
        }
    }