ms) {
                Data.todos.list = items
            })
        }
    }
}

var Todos = {
    oninit: Data.todos.fetch,
    view: function(vnode) {
        return Data.todos.list.map(function(item) {
            return m(&quot;div&quot;, item.title)
        })
    }
}

m.route(document.body, &quot;/&quot;, {
    &quot;/&quot;: Todos
})</code></pre>
<p>Let&#39;s assume making a request to the server URL <code>/api/items</code> returns an array of objects in JSON format.</p>
<p>When <code>m.route</code> i