I'm so close to getting jsx to work with mithril.
However, mithril wants you to wrap child elements in an array. It doesn't show a jsx example more than one element deep in the mithril documentation.
So a mithril component such as
'use strict'
import m from 'mithril';
export default m.Component = {
view () {
return (
<div className={'xxxx'}>
<div className={'xxxx'}>
<div className={'xxxxx'}>
<h2>xxxxx</h2>
<p>xxxxxx</p>
<p>xxxxxx</p>
</div>
</div>
</div>
)
}
};
yields the error message
Mithril v1.0.0 only supports 3 arguments, wrap children in an array.
and the component fails to render. It worked when I just had the header and no paragraph elements. How can I wrap the three elements in an array in a way jsx will parse?