ods</a></h3>
<p>Components can have the same <a href="lifecycle-methods.html">lifecycle methods</a> as virtual DOM nodes: <code>oninit</code>, <code>oncreate</code>, <code>onupdate</code>, <code>onbeforeremove</code>, <code>onremove</code> and <code>onbeforeupdate</code>.</p>
<pre><code class="lang-javascript">var ComponentWithHooks = {
    oninit: function(vnode) {
        console.log(&quot;initialized&quot;)
    },
    oncreate: function(vnode) {
        console.log(&quot;DOM created&quot;)
    },
    onb