Trying out mithril.js
for the first time, so apologies if this is simple question. I'm getting an error message,
Component template must return a virtual element, not an array, string, etc.
when I nest a map()
derived components in another component.
Essentially, I was trying to create a layout like the following simplified example, where the address tags are derived from a .map()
off of the ctrl.list()
prop.
<Layout>
<Left/>
<Right>
<Address>
<Address>
</Right>
</Layout>
Here's a jsfiddle that shows this. If you mount the "Right" component on its own, it renders fine. It's only when that component is nested in another component where it fails. What am I missing, and how do I debug this in the future?