Proposal: ESX as core JS feature

hmm, there are plenty of things i do not like about JSX and why i stay away from using React.
Like the fact that
Any valid HTML isn't valid JSX, you can't use class, style or autofocus
it needs to be written in a specific way, you must instead use className, autoFocus, and style should be an object... which i just think is weird. there is no interpolation between the two. you can't just simply copy paste any html or jsx syntax and use it in another projekt that uses an other framework.
I'm maybe just saying this b/c i am very old school and have been working with vanilla HTML for a very long time.

So i wonder: Why should JSX be the defacto template rendering engine? why not say, Pug, Vue, Lit.js, angular, Aurelia, ejs?

Do we really want to be exposing additional templating languages to the web of the current "most awesome" syntax -- who's to say there won't be a completely different language in vogue in 6-12 months?), but as a cost it fragments the web and adds a substantial additional maintenance burden -- just maintaining the v8 and jsc bindings isn't trivial and they're for the same language.

The issue here isn't "can we make multiple multiple templating languages to the web", to the former i say obviously as we already do, to the latter I say that we don't want to.

Unless we want to turn browser into the engine that everyone hates because of all its unique "features" that break the open web, a la certain browsers in the late 90s.

JavaScript was built to enhance the website and not being dependent on it.
I for instance have javascript turned of in my mobile just b/c there is no adblocker and it's full of ads, popups, cookie notification etc that is just so annoying, plus it loads sites much faster.
brave have a easy toggle on/off

I really don't like mixing html with javascript and having it mixed as a jsx flavored syntax, i much more prefer reusable html syntax so angular, and react is on my "don't ever want to use" list

i don't think we should forget that HTML is a markup language that defines what should be rendered how it should function. and javascript is this thing that makes it a little bit dynamic.
Like building forms... html should say "this needs to be entered", "this is the action", "this is the method", and javascript should just be little thing that ajaxify the form without reloading the page, i really don't want my javascript to be this thing that dose all the logic. cuz javascript and css should be static and well cached and reusable.

So i rather think: what can we do instead to make HTML a better language that everyone can love? instead of adding a new template engine...

4 Likes