(users) {
            state.users = users
        })
    }
}

m.route(document.body, &quot;/user/list&quot;, {
    &quot;/user/list&quot;: {
        onmatch: state.loadUsers,
        render: function() {
            return state.users.map(function(user) {
                return m(&quot;div&quot;, user.id)
            })
        }
    },
})</code></pre>
<p>Above, <code>render</code> only runs after the request completes, making the ternary operator redundant.</p>
<hr>
<h4 id="code-splitting"><a href="#code-s