 m(&quot;li&quot;, &quot;child 2&quot;),
    groupVisible ? [
        // a fragment containing two elements
        m(&quot;li&quot;, &quot;child 3&quot;),
        m(&quot;li&quot;, &quot;child 4&quot;),
    ] : null
])
</code></pre>
<p>However, Javascript arrays cannot be keyed or hold lifecycle methods. One option would be to create a wrapper element to host the key or lifecycle method, but sometimes it is not desirable to have an extra element (for example in complex table structures). In those cases, a 