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)).
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.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
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)).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
anduseState
inside of hooks.