Live data from Hacker News

React chaos in mid and large web apps: Any different experiences?

old.reddit.com

41–50 of 52 posts

Re: React chaos in mid and large web apps: Any different experiences?

#41
post #31

It's one thing to complain about React causing chaos, valid, but I would like to remind everyone about the absolute trainwreck we had before. Just slightly before polyfills and opinionated frameworks. Sure, spinning up a quick JavaScript-infused html file with a jQuery CDN link was probably the fastest way to get going, but structurally, on anything larger, this was a horrendous nightmare for most projects I came acr…

>but I would like to remind everyone about the absolute trainwreck we had before. That isn't good enough. People make the same argument about Git. "But it was so much worse before Git". React was a useful step forward for its time, but it's not a great solution now.

how are they comparable? git is still great and there is no better option

Re: React chaos in mid and large web apps: Any different experiences?

#42
post #3

[flagged]

The trash comments are very flame-baity but the underlying assertion is true that it’s been a long time since it was “the obvious choice”. One of the somewhat ironic things that I don’t know is well understood within the React community is that just purely by the nature of its particular architectural details, it’s only going to continue to become and worse and worse choice as time goes on. What started as its main s…

this comment should be detached from the flagged comment and join the bigger discussion

Re: React chaos in mid and large web apps: Any different experiences?

#43

I've encountered all the issue listed in the post. The worst for me is redundant (overdetermined) state, that is, when a state variable is actually derivable from other state variables. It's pointless, confusing, and broadens the space of possible states, including impossible and inconsistent ones.

I see this all the time, even with coworkers who have worked with react for years and when I question it they have such a hard time understanding what the issue is with this. Not using derived state or in other words not using the minimal state required is one of the most common issues I end up seeing, people just add state everywhere not realizing a lot of the time additional state is not needed and every little var…

To be fair to React, this is 100% the developers' fault. State must be minimal, by definition.

Re: React chaos in mid and large web apps: Any different experiences?

#44
post #31

Earlier quoted context omitted.

>but I would like to remind everyone about the absolute trainwreck we had before. That isn't good enough. People make the same argument about Git. "But it was so much worse before Git". React was a useful step forward for its time, but it's not a great solution now.

how are they comparable? git is still great and there is no better option

Just a quick side note not that I think you are wrong here at all just pointing it out as an FYI but there is a tool currently in development called jj or jiu-jitsu which is currently implemented on top of git but exposes a totally different cli and set of workflows which people seem to think is a huge improvement over git. It’s a cool project to keep an eye on.

Re: React chaos in mid and large web apps: Any different experiences?

#45
post #20

I don't mind how the view part of react works, but I don't like how it gets so complicated managing state. With a lot of state libraries for it now just providing lots of hooks you end up with so much in the view. Like you'll have more than half the component be hook code managing state. While I prefer functional view components, there was something said for the encapsulation class components gave you. We've got our…

serious question: like writing classical UI desktop UI code Why are front end app frameworks so different from desktop GUI frameworks?

I think a big part of it is react specific which is also largely down to the functional approach which took over the community years ago.

That ends up with a very different set of patterns and whatnot compared to lots of various desktop approaches.

Something more traditional desktop looking might be Angular, Lit or Futter which to be fair is actually a desktop and mobile framework that also happens to target web.

If you’re looking for an interesting journey into what that looks like in practice I would suggest doing a couple of flutter tutorials and building a todo app or something. It’s very different looking from React for sure.

Re: React chaos in mid and large web apps: Any different experiences?

#46

Earlier quoted context omitted.

Loved react till v15, I'm lucky enough that I moved into a strictly backend role right about when react 16 was introduced. I don't comprehend how hooks stuff is more readable. I occasionally browse the front end code in our company when trying to debug an issue, and the code just looks so un-intuitive. It's littered with `useHooks`, `useEffect`, `useMemo` and stuff. It's night and day comparing that to our backend/ba…

What does back office mean in this context?

a tool used strictly internally

Re: React chaos in mid and large web apps: Any different experiences?

#47
The organized mid to large web app DOES NOT EXIST - it is a myth, like sasquatch. In the swath of experience I've had from working small startups to massive corporations I have never seen this mythical "organized mid-to-large sized web app" nor heard of anyone speak of it.

There will ALWAYS be cruft, and doubly so in a webapp since what is essentially the "build target" is always moving, heck the language it runs on is always moving.

The title of the post might as well be, "has anyone else worked in a mid to large sized web app code base?". The experience is ubiquitous and has nothing to do with React specifically. In fact the problems that the author mentions, "Large component files with excessive composability" for example, is easily overcome with the exceptional tooling that now exists in the JavaScript/TypeScript ecosystem - of course one might not realize the huge strides that have been taken here if they've only been doing web dev for a couple years.

Anecdotally - I really don't like to see Reddit posts pop up on HN, it degrades the quality of this site towards Reddit's level.

Re: React chaos in mid and large web apps: Any different experiences?

#48
My experience:

  1. Hooks and functional components were supposed to save us, but has made react harder to use in large codebases because most developers don’t use React as intended. A lot of foot guns because most JS devs don’t try really understand closures. I remembered way less problems and bad practices in the componentDidMount days. 
  2. React demos well for small apps, but its un-opinionated nature means there is no standard for large codebases that need to load remote data and manage shared global state. No one likes redux or any other de facto solution. React needs to come with batteries included, or at least strong opinions on how to manage large codebases.

Re: React chaos in mid and large web apps: Any different experiences?

#50
post #3

[flagged]

The trash comments are very flame-baity but the underlying assertion is true that it’s been a long time since it was “the obvious choice”. One of the somewhat ironic things that I don’t know is well understood within the React community is that just purely by the nature of its particular architectural details, it’s only going to continue to become and worse and worse choice as time goes on. What started as its main s…

yeah that's pretty much what i was saying. react is trash.
Post reply on HN