-dynamic-selectors">Avoid dynamic selectors</a></h4>
<p>Different DOM elements have different attributes, and often different behaviors. Making a selector configurable can leak the implementation details of a component out of its unit.</p>
<pre><code class="lang-javascript">// AVOID
var BadInput = {
    view: function(vnode) {
        return m(&quot;div&quot;, [
            m(&quot;label&quot;),
            m(vnode.attrs.type || &quot;input&quot;)
        ])
    }
}
</code></pre>
<p>Instead of making select