/p>
<pre><code class="lang-javascript">// src/views/UserList.js
var m = require(&quot;mithril&quot;)
var User = require(&quot;../models/User&quot;)
</code></pre>
<p>Next, let&#39;s create a Mithril component. A component is simply an object that has a <code>view</code> method:</p>
<pre><code class="lang-javascript">// src/views/UserList.js
var m = require(&quot;mithril&quot;)
var User = require(&quot;../models/User&quot;)

module.exports = {
    view: function() {
        // TODO add code here
    }
}
</cod