Of all programming languages now and past, javascript as it is used today (as opposed plain language) would not be my first choice for "easy to learn". I feel there's huge effective gatekeeping with it but that's just an outsiders perspective :-/
The Javascript ecosystem is dismal. It's very disparate and there's a million ways to do one simple task, compounding that is that things that sound like simple tasks, like rendering a page, are actually not.
If you want a place to start, where the ecosystem is fairly beginner friendly and consolidated, checkout Vue and Nuxt.js. I recently explored every possible frontend for Go that I could find: desktop, web, or otherwise. The fact is that HTML, JS, and CSS still produce the best experience for the end user. Vue and Nuxt made it really easy to produce a hybrid Server Side Rendered and Client Side Rendered (aka Universal) app with still a significant amount of effort, but with that effort directly improving my UI rather than my build environment or configuration.
It’s fine to do so, but knowing the core primitives of the language and the DOM can get you very far without having to reach into a bucket of libraries from npm.
As for bundling, there was and will always be tools, people like to think it was just throwing script tags onto a page before npm and the modern packaging ecosystem happened but that’s not really true. At the heigh of jQuerys popularity there were (and are) entire CDNs devoted to serving it and its plugins (which many evolved to serve all kinds of different pre-packed JS bundles) as was a myriad of concatenation tools that even pre-existed before nodejs
I remember namespacing and dynamic loading tools too. I can’t remember their names anymore but this is not a new thing.
It’s always been volume and choice. It’s much bigger today than it was back then but it’s always been this way as far as I can remember
Now, go tell this newcomer that you don't actually need a server to serve multiple web pages, it can just serve one! Client side rendering with a client side router is a pretty far departure from what even experienced programmers know about the world.
Now, go tell this newcomer that you can absolutely still render components from the server without redrawing the whole page. They'll enjoy this until they run into the limits and constructs of SSR. Again, a pretty far departure from send a whole page.
Now, go tell this newcomer you can do both at once, and that often it's beneficial to do so. You have taken what was a very simple task and made it quite complex.
Regarding React, I consider the "hooks" coding style to be INCREDIBLY ergonomic and have been wondering sometimes if React-like "hooks" could be used elsewhere, esp in other programming languages. Or does that only make sense with UIs?
React Hooks are equivalent to React class components all of whose state management is done through setState, but with the difference you describe. Personally, I find hooks more natural than classes whose state management is done exclusively through setState, but that’s obviously a big YMMV.
Of all languages I've had to learn in my professional career, Python has been the hardest. Not because it's a hard language, but because I have to hunt for what to actually learn.
I hope in the future something like Gemini takes off, so we can stop stepping on each other's feet.
People will just not visit sites with a bad experience if they have alternatives. Market forces and all that.
This will likely be a headache for developers more than a problem for end users..
Hahahahaha, good one!
To that I say: Houdini isn’t the enemy here. Some gripes about performance will be had for bad implementations but at the core CSS is still the foundation.
My core problem is that progressive enhancement or graceful degradation[0]
This of course is a symptom of bad industry practice and bad developer habits, that’s where I have a serious issue with our industry.
Houdini though? It’s the right technology for the job IMO
[0]: https://www.w3.org/wiki/Graceful_degradation_versus_progress...
And if the Web's application layer is not HTML, CSS or Javascript, then what is it?
And the ecosystem even more so.
I'm asking about the bad parts.
Note that I personally use 100% Typescript.
Nevermind that humanity has experienced a quantum leap in productivity and e-commerce that has given generations of entrepreneurs wealth and every consumer on the planet unprecedented quality of life thanks to the Web, and that Web being made possible precisely because the developer-friendly, move fast and break things route that Javascript has taken from day one.
But because there is a new Javascript framework coming out every day (I'm surprised competition is seen in a negative light, on HN out of all places), because it's easy to learn (and we all like to gatekeep a bit, don't we?) and because it's not a "real" language (since you cannot shoot yourself in the foot with a use-after-free), Javascript has become the prime target of ivory tower grumbling.