4 ms·
Its kind of amazing how big a single library (that does very little really) has become. React is obviously the "new jquery", and something else will come one d
by phplovesong 1y ago
Its kind of amazing how big a single library (that does very little really) has become.
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.
- romanovcode 1y ago> Scary stuff. Why? When jQuery went away nothing happened. People just learned the new frameworks.
- huflungdung 1y ago[dead]
- hu3 1y agoI don't think jQuery went away. 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"
- philipallstar 1y agoIt's not scary. It's a pretty small API surface. Lots of time is spent on component styling and all that stuff, which isn't React-specific. 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.
- afavour 1y agoIMO OP is correct that the bootcamp devs are scary, not React itself. 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.
- joshkel 1y agoWould you still say it's a small API surface? State, memos, callbacks (which are just memo functions), effects, effect events, reducers, context, external stores, special handling for any tags that go in the `<head>`, form actions, form status, action state, activities, refs, imperative handles, transitions, optimistic updates, deferred updates, suspense, server components, compiler, SSR? 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.
- philipallstar 1y agoYour list has convinced me that my understanding of React is out of date!
- pyrale 1y ago> 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.
- kode95 1y ago> React is obviously the "new jquery", and something else will come one day. "Something else" is already here and has been for a long time. Vue and Svelte are both excellent alternatives.
- monooso 1y agoI think the point is not that there aren't alternatives—there were plenty of jQuery alternatives—but that React is the dominant force, and this too shall pass.
- schwartzworld 1y agoReact won’t topple for a while, because of none of the alternatives are different enough. React solved a real problem many developers faced by giving them a state management system with a rendering engine, whereas you were likely to make surgical cuts before in response to state change, you can now just write your ui assuming the whole thing rerenders in response to changes to that state. The component system also allowed for an easy way of sharing code as dependencies. Vue, Svelte, Solid and the rest have their individual pros and cons when compared to react, but they are essentially different attempts to do the same thing. 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.
- warmjets222 1y agoThe alternative that eventually beat out jQuery was just better native javascript, though.
- lunarboy 1y agoI come from mobile, and was surprised how nice svelte is. Felt so much more familiar patterns than react
- gloosx 1y agoThey are not. Extending JavaScript with an XML-like syntax that transpiles down to composable function calls feels far more natural. In contrast, extending HTML with a template syntax feels limiting and less intuitive in practice — thats why these frameworks are unlikely to ever reach the same level of traction as React.
- deliriumchn 1y agowhile jquery had a gajillion of exotic apis to do pretty much everything, react is, frankly, pure js with handful of apis: jsx (html with pure js), useState/useEffect/useMemo (rarely you need more), and initial hydration function. Rest is utility libraries, bundler, and all the wondeful things that brings you endless headache and depression because without them fulfilling yet another business req would take 10x more time