(vnode) {
        // vnode.state is undefined at this point
        this.kind = &quot;ES6 class&quot;
    }
    view() {
        return m(&quot;div&quot;, `Hello from an ${this.kind}`)
    }
    oncreate() {
        console.log(`A ${this.kind} component was created`)
    }
}
</code></pre>
<p>Component classes must define a <code>view()</code> method, detected via <code>.prototype.view</code>, to get the tree to render.</p>
<p>They can be consumed in the same way regular components can.</p>
<pre><code class=