5 ms·
Tbh this is basically jsx. Jsx is also cursed.
by trilbyglens 3y ago
Tbh this is basically jsx. Jsx is also cursed.
- tentacleuno 3y agoIf a DSL is "cursed", then JSX is a lot less cursed than that -- it's basically just XML-like shorthand for JS, as opposed to a whole new language.
- phrasecode 3y agoWhy not we think in terms of "tradeoffs"? You'll find that there a million alternative syntaxes that could work but which would require seeking the right balance. Evan You's on this comes to mind again: https://youtu.be/ANtSWq-zI0s?si=fDbJLfA9T5VLvgsZ https://youtu.be/ANtSWq-zI0s?si=fDbJLfA9T5VLvgsZ. Meanwhile, I am happy to put up a quick post regarding the thinking over here. I might have done a bit of that in the introductory article: https://dev.to/oxharris/revisiting-the-html-problem-space-and-introducing-oohtml-3oh5 https://dev.to/oxharris/revisiting-the-html-problem-space-an...
- CipherThrowaway 3y agoSay what you want about JSX, but this is the opposite of the JSX approach. JSX embeds markup in your logic rather than logic in your markup.
- phrasecode 3y ago[dead]
- bastawhiz 3y agoJSX props are just JavaScript expressions. This invents a new third thing.
- gloosx 3y agoNo. JSX doesn't try to stay HTML syntax. JSX is actually just syntactic sugar around pure functions. If you remove the babel transform it will be just a wall of nested functions which output the DOM.