be needed by a different component down the road.</p>
<p>It&#39;s easier to refactor code if that logic is placed in the data layer than if it&#39;s tied to a component state.</p>
<p>Consider this fat component:</p>
<pre><code class="lang-javascript">// views/Login.js
// AVOID
var Login = {
    username: &quot;&quot;,
    password: &quot;&quot;,
    setUsername: function(value) {
        this.username = value
    },
    setPassword: function(value) {
        this.password = value
    },
    canSubmit: funct