>
<hr>
<h3 id="how-to-use"><a href="#how-to-use">How to use</a></h3>
<p>A common pattern is to have data comprised of an array of objects and to generate a list of vnodes that map to each object in the array. For example, consider the following code:</p>
<pre><code class="language-javascript">var people = [
    {id: 1, name: &quot;John&quot;},
    {id: 2, name: &quot;Mary&quot;},
]

function userList(users) {
    return users.map(function(u) {
        return m(&quot;button&quot;, u.name) // &lt;button&gt;Jo