Hacker News new | ask | show | jobs
by mervz 250 days ago
It's a dead end for your use case, let's be very clear about that.

And it's funny that you think anything about React and/or Vue is 'trivial'.

1 comments

Surely you’re not saying the frameworks famous for ui = f(state) actually suck at managing state…
If it only were true. React is nothing like ui = f(state). More like ui = f(some_trivial_state) + lifecycles magic + probably global_state.

Garbage. But effective devrel.

This type of dismissive attitude is so strange to me. The only reason "lifecycles magic + probably global_state" would be causing your app to behave unpredictably is - this is going to shock you - because you closed your mind to a tool by dismissing it as garbage before you used it, and then failed to use it properly because you think its popularity boils down to PR.

For instance, you could entirely forgo the influence of lifecycles and global state by putting everything in a top-level Context with 1 state object that you only ever update by calling `setState`.

After that, you might find reasons to optimize your app, which could lead you to more interesting approaches like reducers or state management libraries or memoization, but I'm guessing you would never get that far and just go back to what you were doing before, since YOUR preferences are battle hardened and reliable software, while things you don't know about are only popular because of Facebook. Obviously.

So, redux? It's either redux or, sorry, "lifecycles magic + probably global_state". And who uses redux in 2025?
Honestly, if you’re getting thru life with this attitude, good for you, but you might want to consider if it’s the only way
I'm doing fine, thank you. Perhaps you didn't understand what I said.

My best ballpark guess for global redux usage in react projects is between 25% and at best 50% if you include redux/TEA-like libraries, but not non-pure usage.

So yes, saying that react is `ui = f(state)` does everyone a disservice. It might be true for you, but it's probably not even the average.

kinda does, tbh.