0
votes

It seems that I can use useDispatch or connect from react redux to dispatch an action or it seems that they are both the same. My question is can I just solely rely on useDispatch to pass store data for the entire react app? If not, in what situation that I must use connect? Thanks

1

1 Answers

4
votes

You can use the useDispatch hook for all your functional react components. If you have a class based component structure you won't be able to use hooks (useDispatch() and useSelector()) and therefore you'll need to use connect.