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.
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.
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.
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.
"Something else" is already here and has been for a long time. Vue and Svelte are both excellent alternatives.
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 javascript, though? That preference, again, seems based on what you’re used to.
The actual goal is to manipulate the DOM based on state changes using a declarative representation.
Javascript seems more like something that was available rather than a good fit. (In fact, they felt like it was a bad enough fit that JSX had to be added to the mix.)
Setting aside any particular framework, HTML seems like a better fit to me… it’s inherently declarative and, of course, has a well understood, well supported relationship with the DOM. Extensions to bind state can be pretty well contained.
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.
That makes sense, but that's not what react does. Components are functions of their "prop"s. The rest of the state comes from a memoized cache in a fiber. Which fiber? That's determined from a reconciliation algorithm. Does it do the right thing? Usually.
You can tell if it's "a function of state" by whether the state is in the parameter list.
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.
I like to argue about it because I like knowing why people think the way they do about React. I'm a long-time React hater and still look for ways to change my mind, so there's a point for me I guess?
Why would I choose to write html in js over writing it in html?
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"