const { h, app } = hyperapp
/** @jsx h */
const Example = ({a}) =>
<div>
Item {a}
</div>
app({
model: "Hi.",
view: model => <div><Example/>this should always render</div>
})
TypeError: undefined is not an object (evaluating 'node.data')
const { h, app } = hyperapp
/** @jsx h */
const Example = ({a}) =>
<div>
Item {a}
</div>
app({
model: "Hi.",
view: model => <div><Example a=""/>this should always render</div>
})
Again, I'm not sure if this is intentional or a bug. Might be nice to show a better error if the ENV isn't production in case this is intended.
@dodekeract Couldn't repro. Both work fine. Neither one render anything.
It would help if you could provide broken examples via a CodePen/Fiddle.
@dodekeract https://jsfiddle.net/q6Lu62L1/
Okay, then the issue is weirder than I expected. I updated the original comment with links.
@dodekeract Thanks! I'll look into this. 馃挭
@dodekeract Fortunately this is somewhat related to https://github.com/hyperapp/hyperapp/issues/92, so fixing this might kill two birds with one stone.
Btw reference https://facebook.github.io/react/docs/jsx-in-depth.html#booleans-null-and-undefined-are-ignored
@tunnckoCore Thanks, that's really useful. I was looking just for that a couple of days ago.
@tunnckoCore thanks for sharing, wasn't aware of the .length "bug"/issue.
Most helpful comment
Btw reference https://facebook.github.io/react/docs/jsx-in-depth.html#booleans-null-and-undefined-are-ignored