Amy Blankenship
Jul 10, 2022

--

Yes, it is, when you _inject the dependency from outside the component_. But at that point it doesn't matter if that dependency is a hook or not (so there is no "advantage" of using one).

--

--

Amy Blankenship
Amy Blankenship

Written by Amy Blankenship

Full Stack developer at fintech company. I mainly write about React, Javascript, Typescript, and testing.

No responses yet