| Maybe a good place to ask this: I've been hearing a lot of "oh we don't use Redux, we use hooks" lately, as if this obviously makes sense. Am I missing something? To me this seems like "oh we don't use Redux, we use arrays". I'm gonna need quite a few more details before I can make any sense of a statement like that. Like... what? How... how does that explain what you're doing? One of these things is not like the other. "Oh we don't use doors on our buildings anymore, we've switched entirely over to trees". Huh? What the actual hell does that mean? |
Context and hooks don't "replace Redux", but they do overlap with some of the scenarios and use cases that previously led people to choose Redux.
Please see my post "Redux - Not Dead Yet!" [0] for information on how Redux compares to tools like React context + hooks and GraphQL, as well as situations in which it makes sense to use Redux.
I'd also suggest reading my post "React, Redux, and Context Behavior" [1] and watching my Reactathon 2019 talk on "The State of Redux" [2] for additional information on these topics.
As you noted, "hooks" and "Redux" are not exclusive. We released our React-Redux hooks API [3] last year, and it's been pretty enthusiastically adopted. We're now updating our docs to show using the hooks API as the default instead of `connect`.
[0] https://blog.isquaredsoftware.com/2018/03/redux-not-dead-yet...
[1] https://blog.isquaredsoftware.com/2020/01/blogged-answers-re...
[2] https://blog.isquaredsoftware.com/2019/03/presentation-state...
[3] https://react-redux.js.org/api/hooks