 {
    oninit: Data.todos.fetch,
    view: function(vnode) {
        return Data.todos.error ? [
            m(&quot;.error&quot;, Data.todos.error)
        ] : Data.todos.list ? [
            Data.todos.list.map(function(item) {
                return m(&quot;div&quot;, item.title)
            })
        ] : m(&quot;.loading-icon&quot;)
    }
}

m.route(document.body, &quot;/&quot;, {
    &quot;/&quot;: Todos
})</code></pre>
<p>There are a few differences between this example and the one before. Here, <cod