News for hackers. Stuff that matters.
Re:Ask HN: Why did Frontend development explode in complexity? by davedx on Monday January 02, 2023 @09:59AM (#34218552)
To be fair most front-end projects have abandoned redux now. It was for sure boilerplate hell.
Re:Ask HN: Why did Frontend development explode in complexity? by arcturus17 on Monday January 02, 2023 @10:13AM (#34218707)
I've been doing some research recently and it continues to be by far the most popular state management framework for React. The fact that there are alternatives doesn't mean that most projects have abandoned it.
Re:Ask HN: Why did Frontend development explode in complexity? by soft_dev_person on Monday January 02, 2023 @10:34AM (#34218968)
Do these metrics count "no framework" as an option? With hooks, context and separation of concerns, most apps can live very well without any "state management framework" at all.
Re:Ask HN: Why did Frontend development explode in complexity? by meindnoch on Monday January 02, 2023 @10:56AM (#34219273)
Has it occurred to you that maybe “state management” is not something you need a framework for?
Re:Ask HN: Why did Frontend development explode in complexity? by Jasp3r on Monday January 02, 2023 @11:14AM (#34219546)
Tell me you're not making complex webapps without telling you're not making complex webapps
Re:Ask HN: Why did Frontend development explode in complexity? by idlewan on Monday January 02, 2023 @12:25PM (#34220664)
The publish-subscribe/observer/mediator pattern is perfectly fine for state management, and doesn't need a framework. At most, a small-ish library, but you can also re-implement it yourself quite easily.

Reading your comment, I have the impression you took it as "there shouldn't be any state management necessary", instead of "state management doesn't need a framework" sense.

Re:Ask HN: Why did Frontend development explode in complexity? by ketzo on Monday January 02, 2023 @01:24PM (#34221559)
"State management is complex, so we used a framework to make things easier."

"Why use a widely popular, well-documented, battle-tested framework? Just have one of your senior devs build something over the weekend. This will definitely reduce complexity."

Like... I get what you're saying. But "build your own" is not a default answer for an extremely complicated software engineering topic (which, yes, state management is!)

Re:Ask HN: Why did Frontend development explode in complexity? by acemarke on Monday January 02, 2023 @04:06PM (#34223655)
FWIW, Redux literally _is_ a pub-sub/observer pattern implementation :) And the Redux core library _is_ extremely small.

But, that led to the community building hundreds of addon libraries for the same sets of use cases, which is what led us to build our official Redux Toolkit package to simplify standard Redux usage patterns.

Re:Ask HN: Why did Frontend development explode in complexity? by ThePadawan on Monday January 02, 2023 @11:26AM (#34219729)
This relates in no way to any statement from the comment you replied to.

Did you mean to reply to a different comment?

Re:Ask HN: Why did Frontend development explode in complexity? by ASalazarMX on Monday January 02, 2023 @12:34PM (#34220790)
> [..] the most popular state management framework for React [..]

Quoted from the comment they're replying to.

> [..] maybe “state management” is not something you need a framework for?

Quoted from their reply.

Re:Ask HN: Why did Frontend development explode in complexity? by ThePadawan on Monday January 02, 2023 @12:47PM (#34221008)
Ah I beg your pardon. I read the comment in completely the wrong tone of voice.

To me it seemed like the comment was attacking its parent for investigating state management frameworks in the first place - when it in fact called out "no framework" as a valid alternative to any number of frameworks.

(I hope that made sense)

Re:Ask HN: Why did Frontend development explode in complexity? by meindnoch on Monday January 02, 2023 @01:29PM (#34221637)
Exactly.
Re:Ask HN: Why did Frontend development explode in complexity? by andix on Monday January 02, 2023 @10:08AM (#34218655)
Tell that to European corporations. Angular + NgRx/NGXS is the de-facto gold standard there.
Re:Ask HN: Why did Frontend development explode in complexity? by dmix on Monday January 02, 2023 @11:00AM (#34219322)
What were they using before?
Re:Ask HN: Why did Frontend development explode in complexity? by wildrhythms on Monday January 02, 2023 @11:53AM (#34220137)
I think Observables are much simpler to grok than some hundreds-line multi-file combined reducer/actions amalgamation.
Re:Ask HN: Why did Frontend development explode in complexity? by andix on Monday January 02, 2023 @12:00PM (#34220255)
I think React hooks are so much easier to write than observables. It provides similar functionality to observables, but without the added complexity.
Re:Ask HN: Why did Frontend development explode in complexity? by acemarke on Monday January 02, 2023 @11:18AM (#34219606)
Redux is still by _far_ the most widely used state management library in React apps. By my estimates, around 35-40% of all React apps use Redux, and that's far more than any other state library in the ecosystem:

- https://blog.isquaredsoftware.com/2022/07/npm-package-market...

Re:Ask HN: Why did Frontend development explode in complexity? by player2121 on Monday January 02, 2023 @12:24PM (#34220636)
True but not for new projects. Legacy software has quite a long life span.
Re:Ask HN: Why did Frontend development explode in complexity? by spaceman_2020 on Monday January 02, 2023 @12:12PM (#34220433)
What are people using now? Good old context?
Re:Ask HN: Why did Frontend development explode in complexity? by dsego on Monday January 02, 2023 @12:31PM (#34220746)
Things like react-query for syncing with server state (which can be most state in web apps) are getting popular, or smaller hook-oriented stores, like zustand, jotai or recoil for true client-side state.
Re:Ask HN: Why did Frontend development explode in complexity? by spaceman_2020 on Monday January 02, 2023 @12:37PM (#34220850)
Second time today that someone has mentioned React-query to me. Sign that I need to look that up finally
Re:Ask HN: Why did Frontend development explode in complexity? by hbrn on Monday January 02, 2023 @01:56PM (#34222076)
What's interesting is why was it so widely accepted in the first place. It's not like boilerplate reveals itself at later stages, it's right there from the beginning. I think it tells a lot about the state of the industry.