4 ms·
Of all the ways to write how your HTML is supposed to look from JavaScript, JSX is probably the closest to Javascript there is. It's a very simple syntax transl
by Ambroos 4y ago
Of all the ways to write how your HTML is supposed to look from JavaScript, JSX is probably the closest to Javascript there is. It's a very simple syntax translation to JS function calls, and all code / logic is still plain JS. Every other template language that invents their own loops / conditionals / ways to insert variables is waaaaaaay further away from JS (and also still needs tooling and editor support).
- itslennysfault 4y ago... or don't write how your HTML is supposed to look from JavaScript. I like Angular's approach the best. You have an HTML file, a SCSS file, and a TS file. The TS file is essentially your model and handles all the thinking. HTML/SCSS are kept declarative like god intended.
- Ambroos 4y agoDo you genuinely think Angular's template language and all the complexity it comes with is better than JSX just saying "anything between {} is plain JS"?