Post

React devs. 👨‍💻 Does useReducer have a place in modern React apps, or has Redux become the more practical choice for most use cases?

0 reposts5 likes

interested to know the replies. i always thought of useReducer as a more modern option, but im likely wrong on that one. personally, ive found since nextjs app router came along with server actions, ive not really used useReducer

In my opinion there's too many moving parts and too much overhead for not that much gain. Imo most of the projects that use Redux don't need it and would be fine with a simple useReducer, or even better use react-query to manage state

Given redux pre-dates functional components and hooks, this seems a bit backwards. I think most apps don’t need redux or similar. Tanstack Query and some contexts for specific bits of shared local state is often enough. Sometimes you want redux or one of the newer alternatives.

Personally I really don’t like the RTK API - I find it not very readable. Plain redux is heavy on boilerplate, so I’d generally choose something other than redux in a new project. I don’t hate it enough to rip it out of existing projects though.