t-instances-outside-views">Avoid creating component instances outside views</a></h5>
<p>Conversely, for similar reasons, if a component instance is created outside of a view, future redraws will perform an equality check on the node and skip it. Therefore component instances should always be created inside views:</p>
<pre><code class="lang-javascript">// AVOID
var Counter = {
    count: 0,
    view: function(vnode) {
        return m(&quot;div&quot;,
            m(&quot;p&quot;, &quot;Count: &quot; + vnode.