Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I partially blame every tutorial and contrived example of how you should use Redux. When first starting with React & Redux I spent some time thinking of where and how I should use Redux.

Being that I was new to both, I didn't have any ingrained best practices, and it was hard to find any best practices around when to use redux.

Every example seemed to use it for everything, which seemed insane to me in a real web app. I could see that the size and clutter would grow terribly, and for no obvious benefit.

Your example above is similar to how many component libraries work (where you need to give the user flexibility).

In a dashboard app, I'll make good use of Redux because there are often sets of data you revisit in different ways.

In a more directory-like site I've recently built I use it to keep track of the logged in user information and high level information that dictates your experience (like user location), but nothing else.



> I partially blame every tutorial and contrived example of how you should use Redux.

Partially? No. The culture of side projects/GitHub/blog post had led people to over engineer their learning materials and side projects to look as employable as possible. Why make a todo list with just React when you can use Redux in it too and put it in your resume?


He he true.

When I do a side project I often want to do fancy stuff and blog about it.

When I get paid for my work, I try to keep it simple, because I fear I could end up with too much intermingled stuff I won't understand anymore after a few months.


Wanting to do fancy stuff for a side project is understandable. I'd prefer my team do that, so they can learn new stuff - and only bring the techniques/tools that actually work to paid projects.


For what it's worth, my links list has a very large section of articles on Redux architecture and best practices: https://github.com/markerikson/react-redux-links/blob/master... . Mapbox's post on "Redux for state management in large web apps" is particularly good: https://www.mapbox.com/blog/redux-for-state-management-in-la... .


I try to keep it as simple as possible.

But for complex dashboards I would probably use some observable based solution.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: