4 ms·
No, JSX is syntactic sugar and nothing more, it requires no context, you can "transpile" it from memory. In my code I sometimes explicitly use React.createEleme
by jakubmazanec 2y ago
No, JSX is syntactic sugar and nothing more, it requires no context, you can "transpile" it from memory. In my code I sometimes explicitly use React.createElement calls, when using JSX is not that useful, because it's always just writing JavaScript, not writing templates; it's just code. Template languages also add different semantics, e.g. those EJS <% or <%_ tags - you can't express them in some equivalent JavaScript code (don't confuse it with compiling the template to some code, that's something completely different).