DEV Community

Discussion on: New Redux Hooks: A Before And After Comparison. Are They Better?

Collapse
 
dance2die profile image
Sung M. Kim

Thank you, Glenn for the intro to the new Redux hooks.

Would using the new Redux Hooks couple React components with Redux so when one was to re-use the component, the site using the component should also use Redux?
(because when connect was used, components could be used by themselves and be connected elsewhere (as it depends only on props)).

Collapse
 
gsto profile image
Glenn Stovall

That's another good point. If you're using these hooks within your component, you would be tightening the coupling that component has with redux. So to your question, it sounds like yes it would.

If you want similar functionality without creating a redux dependency, you could probably create similar functionality with useContext and useState inside of hooks.