and <code>onupdate</code> fire after the UI has been redrawn.</p>
<p>If you need to explicitly trigger a redraw within a lifecycle method, you should call <code>m.redraw()</code>, which will trigger an asynchronous redraw.</p>
<pre><code class="language-javascript">function StableComponent() {
    var height = 0

    return {
        oncreate: function(vnode) {
            height = vnode.dom.offsetHeight
            m.redraw()
        },
        view: function() {
            return m(&quot;div&quot;, &quot