Earlier quoted context omitted.
React doesn’t offer any render optimizations by default, so not worrying about it sounds like blissful ignorance - you’re just ignoring a ton of unnecessary renders because they don’t visibly affect performance (on your development device). After a certain level of complexity the issues will start to show.
React offers tons of optimizations for not re-rendering. useEffect, useMemo, useCallback.
Why I don't miss React: a story about using the platform
171–180 of 279 posts
Re: Why I don't miss React: a story about using the platform
#172Earlier quoted context omitted.
React has edges. Hooks are an anti-pattern with all kinds of footguns. Suspense is also a crazy anti-pattern by literally throwing and catching errors as a means for communicating between parts of the framework. And this isn't an issue of me not understanding React or hooks, I would consider myself to be as expertly acquainted with hooks as it's possible to be. Now, do I still use React for everything? Yes. Do I pref…
> Suspense is also a crazy anti-pattern by literally throwing and catching errors as a means for communicating between parts of the framework. Okay I can criticize React and its weird solutions until the cows come home, but this is a pretty weird one because it’s entirely an implementation detail. No one working with Suspense ever needs to know that’s how it works unless they’re building a library to be compatible wi…
Admittedly, I haven't tried debugging React 18 yet, so I don't know if that actually happens in practice.
Re: Why I don't miss React: a story about using the platform
#173Re: Why I don't miss React: a story about using the platform
#174Earlier quoted context omitted.
Applies the same to jQuery or Bootstrap?
Just a friendly reminder that React is approaching a decade in life. There are no other competing frameworks that look to be taking it’s place. Not saying it will never go away, just that, maybe the front-end world has finally, significantly slowed down in churn. Things could always be better (Svelte is nice) but overall, React does what I need and I rarely curse at its design.
Re: Why I don't miss React: a story about using the platform
#175Earlier quoted context omitted.
What else do you need jQuery for? The most important parts are already included in the browser.
Honestly I bet a significant portion of the code I have maintained (and even some I’ve written) was reinventing a wheel someone didn’t know existed. Not even out of a desire to solve a problem, but simply not realizing it was done already. I suspect people still reach for jquery for similar reasons. They know it makes complicated stuff work, it’s reliable, they don’t need to think about the specifics of the problems…
Re: Why I don't miss React: a story about using the platform
#176Re: Why I don't miss React: a story about using the platform
#177Earlier quoted context omitted.
You implied it. What you should have alluded to is that it is necessary to use technologies today that won’t necessarily be in use in the future, merely as a stepping stone to get us to the next destination, where we will use a new but still temporary technology.
As Scott Adams says, "Analogies are for fighting." If you try to counter a statement with an analogy you almost always simply get a fight.
Re: Why I don't miss React: a story about using the platform
#178Everything on the web "uses the platform". There's no other way to get content into the browser. Web Components are just a part of that platform, and very badly designed at that. A lot of the platform around them now exists only to patch holes in them (like form participation) and to solve the problems they introduced. And since they are now a part of the platform, they poison everything like upcoming CSS scoping whi…
> talks about lit-html which is a fully incompatible replacement for Polymer. lit-html is completely different from web components and not meant to replace Polymer. lit-html is a library that just handles rendering and lit-element, which is meant to replace polymer uses lit-html as its renderer to make web coponents.
React is also just a library that handles rendering. But sure, "it's different".
Re: Why I don't miss React: a story about using the platform
#179> But the web platform isn't perfect, and I suspect most React developers have come across a situation where you’d love to be able to just tweak how your component is being rendered. Honestly, I haven't. The only potential caveat I can think of is when you have some non-reactive legacy code you want to embed inside a React component... but even then React's escape hatches are more than sufficient. If you're really wo…
This has got to be gaslighting at the highest level: oh you're doing something wrong because that's not how you're supposed to do it in React. Not since Java's Spring have I encountered such weird zealotry for a relatively mediocre (but widely popular) framework.
You've now described the Web Components crusade which, among other things, engages in actual gaslighting.