Hacker News new | ask | show | jobs
by sametmax 2696 days ago
> Redux, made for very large scale applications. Most companies shouldn't use redux at all, just as Dan Abramov said several times that you probably don't need it.

As per my own comments, I agree strongly.

> For unknown reasons most front-end developers don't wanna hear that and love to start with mega complexity and boilerplate where just a simple flux store or a library like 'unstated' would suffice.

Not unknown, no. Because FB promoted Flux like it was something magical and never seen before, talked about store without providing best practices or reference implementations, and so many store implementations came out at the same time. And most tutorials, not knowing exactly what to recommand to provide some state to your tiny app, started all to promote one store or another. So people though it was mandatory.

It's like with react tutorials.

When I teach react, I make sure people start by just dropping a script tag, and use createElement. No JSX. No webpack. Most of the page is even static HTML.

Only once they got the basics covered, I build on that up to abstractions, tooling, best practices, etc.

That's not what you read online. Online, people drop some magic lines and say "see how this todo list example is easy ?", then let you die here.

1 comments

I agree with you in terms of learning React. Not sure I agree in terms of app size. Yes, there's some boilerplate associated with Redux. But it's pretty simple, and I find the "one way data flow" model really does simplify thinking about how state transitions work, in a way that is beneficial even for small apps.