Ask HN: What do you like to use for state management with React?
For those building early stage products, how much or how little do you use Redux, etc.? Have some opinions on this but want to hear from others.
Bad: Make unit testing harder. It is harder to share connected components. Performance can suffer if you are not careful enough. It is unclear how Redux will work with new APIs like suspense.
After many years using redux, my general advice is to create many small reducers with flat structure. Favor thunks over middlewares. Do not access state directly, use reselect selectors by default. Use hooks over hoc from react-redux.
For other cases there is MobX.
Redux has some intellectual coherence but, in practice, people struggle with it.
To the extent that your components depend on props as opposed to context, mystery hooks, etc., you can unit test your application, debug it, etc.