←back to thread

446 points talboren | 6 comments | | HN request time: 0s | source | bottom
Show context
adithyassekhar ◴[] No.45040524[source]
This thread has really opened my eyes to how much the world hates react developers, I am one.

Unrealistic timelines, implementing what should be backend logic in frontend, there's a bunch of ways SPA's tend to be a trap. Was react a bad idea? Can anyone point to a single well made react app?

replies(13): >>45040699 #>>45040711 #>>45040798 #>>45040947 #>>45041164 #>>45041374 #>>45041377 #>>45041379 #>>45041735 #>>45043250 #>>45043659 #>>45047956 #>>45050341 #
1. bapak ◴[] No.45043659[source]
After having worked on React for a while, I can tell you that the problem remains between monitor and chair.

React can have all the niceties and optimization in the world, but that fails when its users insist on using it incorrectly, building huge tangled messy components and then wondering why a click takes 1.3 seconds to deliver feedback.

replies(2): >>45046506 #>>45049396 #
2. culi ◴[] No.45046506[source]
As someone who's worked with React professionally for years, it's honestly shocking how few React developers really understand memoization and when it needs to be used

IMO it's the MAIN thing to understand about React—how it renders.

Regardless, now I'm the one with egg on my face since the new compiler promises to eventually remove the need for manual memoization almost entirely. The "almost" still fills me with fear

replies(1): >>45047275 #
3. adithyassekhar ◴[] No.45047275[source]
Is there a good article or something you could point us younglings to? I get that in react almost everything is reactive by default unlike other frameworks. I tend to add useCallback and memo to everything nowadays.
replies(2): >>45048982 #>>45059898 #
4. moi2388 ◴[] No.45048982{3}[source]
That only works if the inputs don’t change often. If they do, it’s actually a performance hit.
5. mvdtnz ◴[] No.45049396[source]
The problem that is that react doesn't have a pit of success. Because it's poorly conceived, poorly designed and poorly written software made by people more interested in getting the word "homomorphism" onto their CV than solving real problems. You knew when they started using terms like "monad" and "functor" in order to attach a click handler to a button that something had gone badly wrong.

In this very thread there's some asshole using the word "memoization" when "caching" would have been fine.

6. culi ◴[] No.45059898{3}[source]
This was one of the best guides out there when it came out. It's from 2021 but I think it still holds up

https://alexsidorenko.com/blog/react-render-always-rerenders

It's a set of 6 short and sweet posts that breaks down rendering behavior, memoization, and relevant hooks