Most active commenters
  • gloosx(8)
  • guappa(5)
  • adithyassekhar(3)
  • makeitdouble(3)
  • hliyan(3)

←back to thread

446 points talboren | 55 comments | | HN request time: 1.18s | source | bottom
1. 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 #
2. noname120 ◴[] No.45040699[source]
https://front.com is an example of a React app done right
3. AndreasHae ◴[] No.45040711[source]
The hate is more geared towards SPAs in general, but there are some shining examples that show that a well-made React/Angular/whatever app can have great UX - Clockify being one of them.

I don’t think the culprit apps would have substantially better UX if they were rendered on the server, because these issues tend to be a consequence of devs being pressured to rapidly release new features without regard to quality.

replies(2): >>45041120 #>>45041192 #
4. lazypenguin ◴[] No.45040798[source]
I don't hate React developers. I hate developers who build consumer facing software and use top of the line hardware and networks to test it while being ignorant to the fact that most of their users will be using their products on 8+ year old consumer grade hardware over spotty 3G
replies(1): >>45041640 #
5. shadowgovt ◴[] No.45040947[source]
It's also misapplied here. If anything, it appears from the changes being made to WebKit that the issue is detailed interactions with DOM change logic and with CSS, not JavaScript. JavaScript may tickle the issue, but that's like blaming the mouse for allowing you to click on a button that has expensive operations attached to it.

I've definitely managed to make a page that uses almost no JavaScript and is dog-slow on Firefox (until Mozilla updated the rendering engine) just by building a table out of flexboxes. There's plenty of places for browsers to chug and die in the increasingly-complicated standard they adhere to.

6. adithyassekhar ◴[] No.45041120[source]
That's a good example.
7. kccqzy ◴[] No.45041164[source]
React was not a bad idea. SPA's tend to be a bad idea. React is just a tool to make SPA's easier to write.
replies(1): >>45044101 #
8. disgruntledphd2 ◴[] No.45041192[source]
And to be fair, the problems that Facebook had when they introduced React are not common problems at all.

As an aside, I was an employee around then and I vividly remember that the next half there was a topline goal to improve web speed. Hmmmm, I wonder what could have happened?

replies(1): >>45043671 #
9. gloosx ◴[] No.45041374[source]
> a single well made react app

What about Slack, the messenger?

Umm, Discord? SoundCloud? Trello? Bandcamp? Spotify?

If I keep going there are actually hundreds and thousands of well-made react apps.

replies(5): >>45041434 #>>45042343 #>>45042485 #>>45049771 #>>45050092 #
10. makeitdouble ◴[] No.45041377[source]
Yes, SPAs are inherently a very niche concept that has been applied to too many things for the wrong reasons.

On react, it's funny that sites where the frontend part is really crucial tend to move away from generic frameworks and do really custom stuff to optimize. I'm thinking about Notion, or Google Sheets, or Figma, where the web interface is everything and pretty early on they just bypass the frontend stacks generally used by the industry.

11. Aldipower ◴[] No.45041379[source]
Tredict is a webapp written in React that works for me since years. It is fast, stable and useful.

The problem isn't React. The problem are KPIs and unrealistic timeline. It is the same then ever. Not a fault of React at all.

12. makeitdouble ◴[] No.45041434[source]
Isn't the most common complaint against Slack that it's not optimized enough for what it does ? That's how I read the rants against its electron app, and people are already choosing the electron app against using it straight in the browser (as they'd do for Gmail or Calendar for instance)
replies(1): >>45041618 #
13. gloosx ◴[] No.45041618{3}[source]
Slack is one the most slick and pleasant pieces of software to use. It's big success as well as the fact that it's acquisition cost was one of the largest software deals ever – tells of itself – it's certainly a fine piece of software made by fine engineers who used react and electron with a certain amount of dignity. People who rant about tools like react or electron affecting their performance just don't want to understand that it's organisation and people behind the tools who are responsible for their performance.
replies(4): >>45041775 #>>45046433 #>>45047461 #>>45051063 #
14. dpkirchner ◴[] No.45041640[source]
And then there's the devs and PMs that have an irrational fear of the back button -- enough so that they never ever use it on their SPA.
15. AlienRobot ◴[] No.45041735[source]
React feels like magic the first time you try it, specially if you don't have any experience with JSX. Then you need to prop drill and you regret everything.

The main problem is that it tries to do away with a view model layer so you can get the data and render it directly in the components, but that makes managing multiple components from a high level perspective literally impossible. Instead of one view model, you end up with 50 React-esque utilities to achieve the same result.

16. makeitdouble ◴[] No.45041775{4}[source]
I'd make an argument about the need for Slack to go beyond.

As you point out it's wildly successful and is the backbone of many groups internal communication. Many companies would just stop working without Slack, that's a testament to the current team's efforts, but also something that critical would merit better perfs.

I'd make the comparison with Figma, which went the extra mile to bring a level of smoothness that just wouldn't be there otherwise.

17. sunaookami ◴[] No.45042343[source]
Discord is well-known to be very buggy, e.g. the search function. Spotify is also very slow with thousands of placeholder skeletons. Remember that Spotify once had a very fast native player.
replies(1): >>45042751 #
18. ilikepi ◴[] No.45042485[source]
Ah, since Atlassian has been increasingly messing with Trello over the past couple years, it has really gone to shit. I currently have a Firefox profile dedicated solely to it, using >2 gigs of memory and about 1/3 of an M1 core. It has cumulatively used about a day's worth of CPU time in since I booted in 6 days ago. In contrast, the profile dedicated to Slack is using 750 MB and has burned about 27 minutes of CPU time.
19. fkyoureadthedoc ◴[] No.45042751{3}[source]
> Spotify is also very slow with thousands of placeholder skeletons. Remember that Spotify once had a very fast native player.

Are you under the impression that the placeholder skeletons are there and slow because of React? How would a UI written in C++ get the data quicker from the back end to replace the skeleton with?

replies(1): >>45049023 #
20. TiredOfLife ◴[] No.45043250[source]
https://github.com/ethanniser/NextFaster

https://t3.chat/

21. 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 #
22. Zanfa ◴[] No.45043671{3}[source]
> And to be fair, the problems that Facebook had when they introduced React are not common problems at all.

That’s one of my favorites. The exact bug they described during React launch presentation, that React was supposed to help fix with the unidirectional dataflow. You know the one where unread message badges were showing up inconsistently in the UI in different places. They never managed to fix that bug in the 10 years since React was announced and I eventually left Facebook for good.

replies(1): >>45049630 #
23. bn-l ◴[] No.45044101[source]
React is a terrible idea. Everything about it is garbage. The api. State. How they do rendering. The “vdom”. It’s unnecessarily complicated and Byzantine. Like it was designed by someone trying to bill a large company many hours.

Svelte is ok. It could have been great but the api for their version of observables is a disaster (which I hope they eventually fix). Sveltekit is half baked and convoluted and I strongly advise not touching it.

replies(1): >>45044630 #
24. kccqzy ◴[] No.45044630{3}[source]
React is a good idea compared to having to do SPA's without it. Try doing a SPA with only jQuery.

VDOM is also a good idea that simplifies the mental model tremendously. Of course these days we can do better than a VDOM. Svelte in fact doesn't use a VDOM. You can say that VDOM is a terrible idea in comparison with Svelte, but that's just anachronistic.

replies(1): >>45050075 #
25. zac23or ◴[] No.45046433{4}[source]
> Slack is one the most slick and pleasant pieces of software to use

I've never heard anyone say that before!

replies(1): >>45050620 #
26. 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 #
27. adithyassekhar ◴[] No.45047275{3}[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 #
28. EPWN3D ◴[] No.45047461{4}[source]
Slack is the best of a bunch of trash options. That doesn't make it good. I shouldn't be able to accidentally select every widget in an app as though it were text. But with Electron apps, that's just normal.

Slack puts a nicer shade of lipstick on the pig than Teams does, but the lips still belong to the same thing.

replies(2): >>45048958 #>>45050677 #
29. hliyan ◴[] No.45047956[source]
Been a huge React/SPA fan for many years, until the realization began to creep on me that building them was actually harder than building C++ MFC desktop applications (which I did back in the 2000's). Declarative markup was supposed to reduce cognitive load, but it now feels like the interplay between the declarative part of UI development (component markup) and the procedural part (event handling and state) has slowly morphed into something more complex than simplly developing the UI procedurally.

Back in the day (I was a junior dev) this was easier than grappling with React hooks today:

    BOOL CMainDialog::OnInitDialog()
    {
        CDialogEx::OnInitDialog();
        m_pPropertySheet = new CMyPropertySheet(_T("My Tabbed Dialog"), this);
        m_pPropertySheet->Create(this, WS_CHILD | WS_VISIBLE, WS_EX_CONTROLPARENT);

        CRect rectMainDialog;
        GetClientRect(&rectMainDialog);
        CRect rectPropertySheet(10, 10, rectMainDialog.Width() - 20, rectMainDialog.Height() - 20); 
        m_pPropertySheet->MoveWindow(rectPropertySheet);

        return TRUE; 
    }
replies(2): >>45048352 #>>45048393 #
30. winrid ◴[] No.45048352[source]
Last couple years I built a largish javafx app and this was the entire way I structured it. A little tedious, but if I have a state management issue it's just logic on my side and not ten layers of abstraction.
replies(1): >>45048397 #
31. NooneAtAll3 ◴[] No.45048393[source]
what does MFC mean?
replies(1): >>45048404 #
32. hliyan ◴[] No.45048397{3}[source]
That's a good way to put it. A bit tedious, but the mental model is relatively simple. Reading and writing code feels a little closer to riding a bicycle than operating a Rube-Goldberg device.
33. hliyan ◴[] No.45048404{3}[source]
The Microsoft Foundation Class library: https://learn.microsoft.com/en-us/cpp/mfc/reference/creating...
34. lmm ◴[] No.45048958{5}[source]
> I shouldn't be able to accidentally select every widget in an app as though it were text.

I absolutely should. I hate how many applications have a UI that won't let me copy-paste an error message to search for, much less a menu item; who could possibly have thought that was a good idea?

35. moi2388 ◴[] No.45048982{4}[source]
That only works if the inputs don’t change often. If they do, it’s actually a performance hit.
36. lmm ◴[] No.45049023{4}[source]
> Are you under the impression that the placeholder skeletons are there and slow because of React? How would a UI written in C++ get the data quicker from the back end to replace the skeleton with?

Regardless of how, the fact remains that the previous implementation of their UI did fetch and render the data from the backend significantly faster than the current React-based one does.

replies(1): >>45049309 #
37. anon7000 ◴[] No.45049309{5}[source]
I’ve been using Spotify for 10+ years, and it’s DEFINITELY faster today than it was when I first used it.
38. 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.

39. disgruntledphd2 ◴[] No.45049630{4}[source]
To be fair, that bug increases engagement so it'll never be fixed. All must kneel before Deltoid/QRT!
40. TheDong ◴[] No.45049771[source]
Slack on my machine is currently taking ~1GiB of memory and 3% cpu to do nothing.

My irc client is taking 60MiB of memory and 0.01% cpu. My IRC client is responsive and faster, it has more configurable notification settings. I like the irc client more.

> Bandcamp

I just went to the bandcamp page and it indeed loaded very quickly. As far as I can tell, there's no react in use anywhere so I guess that's why.

What do you mean by bandcamp using react?

replies(2): >>45050097 #>>45050401 #
41. guappa ◴[] No.45050075{4}[source]
but SPA are a terrible idea
42. guappa ◴[] No.45050092[source]
> What about Slack, the messenger?

You call it well made? I'm sorry for you, you must really live a really harsh life.

replies(1): >>45050580 #
43. guappa ◴[] No.45050097{3}[source]
I use localslackirc, so I can be on battery rather long.
44. iamsaitam ◴[] No.45050341[source]
It's one of those cases where it only get's noticed when it's bad. It's also easy to hate on web technologies since everyone get's to use them everyday (larger user base). But most important of all, it makes people feel good about themselves hating on a technology used lot of times by people who are just starting out with programming. Gatekeeping at its best.
45. gloosx ◴[] No.45050401{3}[source]
On my machine Slack is taking 100MB of memory and 0.1% CPU to do nothing. Maybe we are using different Slack or one of us is lying about the "doing nothing" thing.

It's possible I'm wrong about bandcamp using react but your guess is far from reality as well – react itself does not prevent or discourage loading pages very quickly.

46. gloosx ◴[] No.45050580{3}[source]
>you must really live a really harsh life.

I do. What are you calling well-made software in your nice enlightened life? Open my eyes.

replies(1): >>45050628 #
47. gloosx ◴[] No.45050620{5}[source]
Never heard anyone complaining either./
replies(1): >>45056193 #
48. guappa ◴[] No.45050628{4}[source]
compare slack with telegram-desktop for example, which has similar functionalities but is way faster.
replies(1): >>45050786 #
49. gloosx ◴[] No.45050677{5}[source]
>Slack is the best of a bunch of trash options. That doesn't make it good

Well, that's a valid framework too, but by the practical standard of goodness – the best of trash is actually good — because you don't judge goodness against some abstract ideals, but against available choices. Both are valid frameworks, but only one is useful in practice.

50. gloosx ◴[] No.45050786{5}[source]
It would not be faster without some kind of a tradeoff, so it does use way more RAM.
replies(1): >>45051320 #
51. Y-bar ◴[] No.45051063{4}[source]
Slack is a slow and clunky app using well over a gig of RAM, the UI abhors standard MacOS conventions and can’t even use the operating system spelling dictionary.

It’s best in class because everything else is worse. It’s a sad state of affairs.

52. guappa ◴[] No.45051320{6}[source]
What are you talking about? It runs on the pinephone.
53. LtWorf ◴[] No.45056193{6}[source]
Try meeting people who use slack?
replies(1): >>45056751 #
54. gloosx ◴[] No.45056751{7}[source]
I do for the past 10 years or so ;)
55. culi ◴[] No.45059898{4}[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