by phplovesong · 1y ago · 0 comments
React is obviously the "new jquery", and something else will come one day. So many specially boot-camp devs are "react only" devs.
Scary stuff.
Web components tech such as Lit might be part of the future, replacing JSX, and then React purely becomes a middleware tool for DOM diffing and shuffling events up and data down.
Or maybe it's a small enough API but a lot of concepts. Or maybe I'm just grumpy that the days of "it's just a view layer" feel long ago.
That abstraction was always leaky, in that it begged many more questions that had to be answered.
Part of the appleal was that it was limited in the perimeter, and part of the curent situation is that the community around React-the-library created the tools to answer these other questions, which means that React-the-ecosystem is much more complex than React-the-lib.
I’ve interviewed a number of engineers who have very little grasp of what the DOM is and how it works because React abstracts the whole thing away. Server components are another are where some niceties mean a bunch of developers aren’t really understanding what’s going on with underlying HTTP requests.
While React’s API surface is small the average app will come with a chunk of extra stuff: Redux, next.js, yadda yadda. People take entire courses that never leave that bubble.
"Something else" is already here and has been for a long time. Vue and Svelte are both excellent alternatives.
Subjectively I am extremely in opposition to the fact that XML anything with composable functions is more intuitive than HTML templates by any stretch of the imagination.
Hard disagree. React became popular because it was much better than its predecessors like Backbone, and also better than its contemporaries like the first Angular. I was still learning JavaScript, when I was doing a browser app for my thesis, and I used Backbone as a framework. Awful experience, using React was much more intuitive. While Backbone was imperative, React was declarative, with composable components, no custom HTML template syntax. Using React made web development fun for me.
> extremely in opposition to the fact that XML anything with composable functions is more intuitive than HTML templates
And I hate HTML templates. I think there are just two groups with different preferences and therefore it's somewhat useless to argue about this stuff.
Why would I choose to write html in js over writing it in html?
You want to topple react, you need to solve a problem that’s as big as state management used to be in a way that react can’t also just copy/absorb, and you have to do it so well that developers will push to use it at work. You need to have a ux as clean as what React offers to its devs, and you probably need to come close enough in benchmarks to not get instantly shot down.
Why? When jQuery went away nothing happened. People just learned the new frameworks.
And it might never unless browsers implement better DOM apis.
The current DOM API implementation reminds me of that quote:
"look what they need to mimic a fraction of our power"