connect still works fine, and we're going to continue maintaining and supporting it indefinitely.
But, useSelector and useDispatch are shorter and easier to work with in many cases, and they definitely work better with TypeScript. There's less indirection, less code, and it's more obvious what's happening.
Hi my name is Omar, I’m a software engineer that specializes in creating great front end experiences, primarily using react. When I’m not engineering I like to game and make music.
connect
still works fine, and we're going to continue maintaining and supporting it indefinitely.But,
useSelector
anduseDispatch
are shorter and easier to work with in many cases, and they definitely work better with TypeScript. There's less indirection, less code, and it's more obvious what's happening.Hooks in general (and especially React-Redux hooks) do bring up a different set of tradeoffs, which I talked about in my post Thoughts on React Hooks, Redux, and Separation of Concerns and my ReactBoston 2019 talk on "Hooks, HOCs, and Tradeoffs". I'd encourage you to go through those.
Thanks for the links, that’s exactly what I was looking for. My team and I have been trying to understand the trade offs.