DEV Community

Discussion on: What is Redux Toolkit? 🔨

Collapse
 
lexiebkm profile image
Alexander B.K.

As for React-Redux, when we are still using class components, then the only way to use React-Redux is by using Connect API, right ? Only when we use Hooks, then we can use Hooks API provided by React-Redux such as useSelector, useDispatch.
It seems that I need to get used to both ways, in anticipating (existing) codebases which use both class components and function components (with Hooks).
I myself have been only using class components in my last project. However, after reading motivation in React official site about Hooks, it's time for me to switch to functional components with Hooks. One thing I should consider when using Hooks, though, is whether 3rd party libraries I have been using, support Hooks in their APIs.
Sometimes, because of this different ways of using class components or Hooks in React, make me think to switch to Angular or Vue which I am still learning too.