4 ms·
JSX isn't "just JS" either. Did you consider using plain JS? You can still move markup into script.
by spankalee 6y ago
JSX isn't "just JS" either. Did you consider using plain JS? You can still move markup into script.
- k__ 6y agoYes, the arguments here are ridiculous. Everything that IS actually just JS is listed (hooks, actions, reducers), but the only thing that isnt (JSX) is used without a question. Sometimes React critique just reads like an elaborate trolling attempt.
- eyelidlessness 6y agoJSX being a macro-like compile time primitive is actually its biggest strength. It’s a data structure but its implementation is undefined, so JSX implementations are free to compile it to whatever is most suitable for its runtime. Including compiling it away to nothing. “It’s just JS” can certainly do that but you need additional compile time signals.