Mithril.js multiple css class
<p>I'm new at mithril.js. I have a div, I want to add class "invalid" if ctrl.invalid()==true, and "hidden" if ctrl.hidden()==true.</p>

<p>If I use <code>m('div', {class: ctrl.invalid() ? 'invalid' : '', class: ctrl.hidden()? 'hidden' : ''})</code>, they override each other.</p>

<p>I can use <code>m('div', {class: [ctrl.invalid()?'invalid':'', ctrl.focused()?'focused':''].join(' ')})</code>, and it'll work, but it looks messy.</p>

<p>Is there an elegant solution for this? Thanks.</p>