fenwick 🔲 is a user on octodon.social. You can follow them or interact with them if you have an account anywhere in the fediverse. If you don't, you can sign up here.

I don't understand how JSX came to be.
What sort of person, when faced with a task to generate html from javascript, thought: sure, the best way to do that is include <tags> in the source and precompile them into function calls??

I can sort of understand that React Native simply inherited this very questionable decision.

But why didn't they create njsx in the first place? Guess we'll never know.
github.com/uqbar-project/njsx

fenwick 🔲 @fenwick67

@matejcik first guess: template literals weren't a thing yet?

· Web · 0 · 0

could be? but like, jsx goes way beyond interpolation. and njsx on the other hand doesn't need it.
"html compatibility" isn't even an argument, jsx looks similar but isn't even actually a subset. ISTM someone somewhere just likes writing <tags>