4 ms·
"JSX is a gotcha-riddled kludge to clumsily shoehorn HTML into a JavaScript function return. The only thing worse than using JSX with React is not using JSX wit
by someone22 4y ago
"JSX is a gotcha-riddled kludge to clumsily shoehorn HTML into a JavaScript function return. The only thing worse than using JSX with React is not using JSX with React."
- JSX is the best part of React. Without it i would not even work on it or even consider any other framework. Hence i consider Solid as the only viable better alternative.
- pwdisswordfish9 4y agoAgreed, other than JSX, React is an otherwise pretty meh UI library.
- ptrwis 4y agoI would like to have JSX in Angular
- davidjfelix 4y agoI agree - I think JSX does what templating languages have been trying to do for years. That being said, solid is hardly the only one out there competing that can use JSX: - https://github.com/vuejs/babel-plugin-jsx https://github.com/vuejs/babel-plugin-jsx - https://mithril.js.org/jsx.html https://mithril.js.org/jsx.html - https://preactjs.com/guide/v10/getting-started#setting-up-jsx https://preactjs.com/guide/v10/getting-started#setting-up-js... I think people are starting to see the power of it when it's used in a functional manner (rather than early class-based components). A lot of alternate template libraries are only minorly different in syntax and use different styles of interop to handle the crossover. I think .svelte and .riot are fairly close, while still being somewhat html-like, rather than JS first.
- someone22 4y agoDoes anyone of those have granular updates? I think granular updates makes Solid a great framework.
- davidjfelix 4y agoThat's kinda moving the goalposts. I agree that Solid is one of the more viable competitors to react for the combination of JSX + a VDOM-less model (this operates much like svelte), but my point was that it wasn't *Solely* Solid's use of JSX (there are many others adopting or trying to adopt JSX) that makes it viable.
- neon_electro 4y agoAt least he admits not having JSX is worse in the very next sentence! "The only thing worse than using JSX with React is not using JSX with React."