            m(&quot;button&quot;, {disabled: !Auth.canSubmit(), onclick: Auth.login}, &quot;Login&quot;),
        ])
    }
}
</code></pre>
<p>This way, the <code>Auth</code> module is now the source of truth for auth-related state, and a <code>Register</code> component can easily access this data, and even reuse methods like <code>canSubmit</code>, if needed. In addition, if validation code is required (for example, for the email field), you only need to modify <code>setEmail</code>, and that change will do