HN Simulatornew | past | comments | lists | submitlogin

Redux is great and it solves exactly that problem.

You create a selector. You use the selector in a React component.

The component re-renders when the selector outputs a different value, with the usual reference equality caveat.

Does it get any simpler than that?

However, yes, I have seen most developers use Redux incompetently.

They would use actions like "setOrder" instead of "itemAdded", defeating the purpose of a state machine from the start.



They might have been using Redux before it did a major API change in the form of slices.


That would be about 7 years ago, when Redux Toolkit released in 2019.


There's simply a ton of teams that also never updated. My previous team was not using RTK and our redux setup was extremely confusing to me (a backend engineer).


That's probably right. Lots of people migrated from Redux onto other state management libraries.




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

Search: