Amy Blankenship
Oct 16, 2021

--

I agree with this. A better example of DI is Redux mapDispatchToProps (and one reason I don't like hooks, including the Redux version--they pretty much make DI impossible). To be fair, though, ES6 pretty much promotes this anti-pattern everywhere.

--

--

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