3 ms·
It's how react works, though, and react is absolutely dominant... do you think that's despite the "terrible idea"?
by s17n 3y ago
It's how react works, though, and react is absolutely dominant... do you think that's despite the "terrible idea"?
- hamandcheese 3y agoI agree they are technically the same, but JSX is miles ahead. Most HTML is valid JSX, minimizing the mental overhead. JSX has great tooling, and TSX has great type safety.
- thraxil 3y agoJust need to point out that "Most HTML is valid JSX" doesn't really sound true to me. Eg, show me a non-trivial HTML web page that doesn't have any `class="..."` attributes (I've managed to avoid doing much React/JSX for the last few years, but I seem to remember that you had to use `className` because `class` is a reserved word in JS).
- hamandcheese 3y agoYou are right. I still maintain that JSX<=>HTML is much easier to think about than Go<=>HTML.
- latchkey 3y agoNo, it doesn’t work like that.