Live data from Hacker News

React Still Feels Insane and No One Is Talking About It

mbrizic.com

21–30 of 41 posts

Re: React Still Feels Insane and No One Is Talking About It

#21

Earlier quoted context omitted.

Progressive. Enhancement. Yes, it needs to work, fully, without CSS or JS. Then, use CSS to make it look nicer, and use JS to make it behave nicer. The total failure of most people who build professional web sites to follow standards and make them pain-free continues to baffle me, when it’s not that hard to do right and helps ensure the site is maintainable going forward, regardless of which new JS library or framewo…

If by 'nicer' one wants to avoid the flash of blank between clicks, then I don't see how you'd avoid recreating an SPA

I read the server-side-rendered forums of DLang, and everything happens so fast, in around 200 ms, that I don't feel I am losing anything by the forums not being an SPA.

Re: React Still Feels Insane and No One Is Talking About It

#22

Earlier quoted context omitted.

If by 'nicer' one wants to avoid the flash of blank between clicks, then I don't see how you'd avoid recreating an SPA

This doesn't happen for me when clicking around sites like HN or my blog, both are server side rendered and I'm on a pretty flakey connection right now. Browsers solved this a long time ago with how they deal with page changes.

your connection is not flaky enough. for me the average page load on HN is a full second. i just had one page take 1.8 seconds...

(edit) submitting this comment took 1.5 seconds.

Re: React Still Feels Insane and No One Is Talking About It

#23
post #17

I would be interested in seeing a legit back and forth between this view and alternatives. Advocates of react, in particular, would be a good read after this.

The failure of every new solution seems to always come back to the fact that html, css, and js are just too poorly suited for building the complex UIs people want today. And the sad reality is that there isn't an engineer out there building these things that has any agency to come up with an alternative.

It would take Google, Apple, and Microsoft coming together to define a new system of building as an alternative. Think things like, new client, new protocol, new language, perhaps not having to write anything resembling markup at all (the joy!),

Obviously the chances of this happening are nil. So we shuffle along adding yet another layer of transformation on top of these broken technologies, hoping it will be enough.

Re: React Still Feels Insane and No One Is Talking About It

#24
post #6

I was like "gosh I feel like he's just complaining about the organic complexity in the domain" and then he says it at the end: >So, this entire rant about React... it's not even React's fault. Neither is Angular's, or jQuery's. Simply, whichever tech you choose will inevitably crumble down under the impossible complexity of building a reactive UI. and then he's like "ok the solution is to just not make big interactiv…

More likely they don't even need to use useMemo if it's not an expensive calculation. They can just calculate the dependent values during rendering, which is explained in the docs: https://react.dev/learn/you-might-not-need-an-effect#updatin...

If `getLinkedCats` calls an external API, then the calculation can instead be all in the same useEffect.

The number one mistake I see people inexperienced with React doing is using too many useEffect's in their code, which is both hard to read and hurts performance, since it results in more renders than necessary.

Re: React Still Feels Insane and No One Is Talking About It

#25
post #23
post #17

I would be interested in seeing a legit back and forth between this view and alternatives. Advocates of react, in particular, would be a good read after this.

The failure of every new solution seems to always come back to the fact that html, css, and js are just too poorly suited for building the complex UIs people want today. And the sad reality is that there isn't an engineer out there building these things that has any agency to come up with an alternative. It would take Google, Apple, and Microsoft coming together to define a new system of building as an alternative. T…

Yes, the original set of web technologies was simply not designed with the kinds of interactive UIs people expect today.

Perhaps in the future UIs can be rendered with WASM, with the common rendering libraries being distributed as a separate WASM module (so users would not have to repeatedly download large files)?

Re: React Still Feels Insane and No One Is Talking About It

#26
post #23
post #17

I would be interested in seeing a legit back and forth between this view and alternatives. Advocates of react, in particular, would be a good read after this.

The failure of every new solution seems to always come back to the fact that html, css, and js are just too poorly suited for building the complex UIs people want today. And the sad reality is that there isn't an engineer out there building these things that has any agency to come up with an alternative. It would take Google, Apple, and Microsoft coming together to define a new system of building as an alternative. T…

My personal take is largely to blame the css/html divide as the biggest hurdle here. Maybe it is the three fold css/html/js divide, more broadly?

It isn't that any one of them is bad. But, having three seems to want to relate to a Conway's Law where you have three different "teams" somewhat collaborating with each other. In reality, far more is done by a single team than otherwise. Even when you have a graphics design team, often they build their first artifacts in other systems and then it is down to that single team to try and bridge them together.

There is also the absurd level of flexibility that was baked into CSS. Somewhat ironic that we are digging our way out of the limitations of CSS by adding more and more flexibility to it.

Re: React Still Feels Insane and No One Is Talking About It

#27
post #24
post #6

I was like "gosh I feel like he's just complaining about the organic complexity in the domain" and then he says it at the end: >So, this entire rant about React... it's not even React's fault. Neither is Angular's, or jQuery's. Simply, whichever tech you choose will inevitably crumble down under the impossible complexity of building a reactive UI. and then he's like "ok the solution is to just not make big interactiv…

More likely they don't even need to use useMemo if it's not an expensive calculation. They can just calculate the dependent values during rendering, which is explained in the docs: https://react.dev/learn/you-might-not-need-an-effect#updatin... If `getLinkedCats` calls an external API, then the calculation can instead be all in the same useEffect. The number one mistake I see people inexperienced with React doing is…

I'll point out that just on this comment string from telmac are 3 different interpretations of what is wrong with the code and what should be done instead.

Re: React Still Feels Insane and No One Is Talking About It

#28
This article makes ME feel like I'm going insane. Have you even read the React docs?

The article you linked about "patterns" in React is explicitly referencing patterns that are 7+ years out of date. Hooks were built to REPLACE those patterns, and they did a phenomenal job.

90% of this article is immediately invalidated by introducing a simple, 20loc "useQuery" hook (or, god forbid, looking at ANY of the libraries that provide similar. Shoutout React Query)

I really wish we could get more valid critique of React from people who actually understand the framework, instead of this drivel from devs who spend more time complaining in blog posts than reading the docs.

Re: React Still Feels Insane and No One Is Talking About It

#29

Earlier quoted context omitted.

Progressive. Enhancement. Yes, it needs to work, fully, without CSS or JS. Then, use CSS to make it look nicer, and use JS to make it behave nicer. The total failure of most people who build professional web sites to follow standards and make them pain-free continues to baffle me, when it’s not that hard to do right and helps ensure the site is maintainable going forward, regardless of which new JS library or framewo…

If by 'nicer' one wants to avoid the flash of blank between clicks, then I don't see how you'd avoid recreating an SPA

The View Transitions API (https://developer.mozilla.org/en-US/docs/Web/API/View_Transi...) is intended to let you control transitions between clicks.

Re: React Still Feels Insane and No One Is Talking About It

#30
post #6

I was like "gosh I feel like he's just complaining about the organic complexity in the domain" and then he says it at the end: >So, this entire rant about React... it's not even React's fault. Neither is Angular's, or jQuery's. Simply, whichever tech you choose will inevitably crumble down under the impossible complexity of building a reactive UI. and then he's like "ok the solution is to just not make big interactiv…

Yes, it's bad code, and aren't we all having fun laughing at the anonymous dev who wrote it. However, I've seen this kind of code in the wild, and I'd be shocked if you hadn't, too. _Who_ wrote it matters a lot less than the fact that _so many people_ write it. I think that React has optimized for developer velocity, but the primitives make it so easy to shoot yourself in the foot, that in a large codebase with lots of devs, it becomes hard to avoid.
Post reply on HN