Echo JS 0.11.0

<~>

MaxArt 2936 days ago. link 1 point
I remember when I saw a similar solution on Stack Overflow a while ago. It was frowned upon and for a good reason, since all expressions and branches were evaluated anyway.

But if there's a Babel plugin that transpiles those pseudo-components, that's another story and no harm is being done. Just two considerations:
- it won't work for TypeScript, not until TS will have a decent plugin system to work with (which is  a *very* complex thing to do in this case, as the strenght of TypeScript relies in its monolithic understanding of the syntax extension it provides);
- they're actually, as I said, *pseudo*-components, which means they look like components but they're just syntactic sugar. This could be jarring for newbies, but also in the long term (with othe similar extensions) I think it would spoil the cleanness of JSX.

Unfortunately, every day that passes we're seeing the limits of JSX. For more complex compositions, it becomes more and more awkward to use (some say the ternary operator should be banned from being used in all languages altogether - there's even the "no-ternary" option for ESLint).