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.