3 ms·
Out of curiosity, why do you prefer JSX to nesting functions? I understand that for HTML you want to meet developers where they are, but that doesn't necessaril
by tomasreimers 6y ago
Out of curiosity, why do you prefer JSX to nesting functions? I understand that for HTML you want to meet developers where they are, but that doesn't necessarily apply to other use cases...
- phpnode 6y agoJSX is a tree of deferred function calls. It's nothing to do with HTML, despite them looking similar. Normal function calls are not equivalent
- nesarkvechnep 6y agoWell, yeah. Can't you defer normal functions?
- phpnode 6y agoIt can be done if you write your code like this: function MyThing() { return ( el(A, {value: 123}, [ el(B, {value: 456, foo: true}, [ el(C, {awesome: true}), el(D, {awful: false}) ]) ]) ); } but there's a reason people prefer JSX syntax