I recently had a problem while testing a NEST application where I had to check if some methods were using a specific decorator, it was a hell on earth, I'm not really a fan of dependency injection and this is one of the reasons haha
But in this text case, sometimes in a React application at some point, you need to have a component that talks with the external world, like in the example LaunchDarkly, and sometimes you can't just pass the function as a parameter, in my simplistic example here yes, but in real life not always, for instance, if this were a ReactHook, you can only call it in some specific points etc
To be frank this was the motivation I had to write this text
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.
I recently had a problem while testing a NEST application where I had to check if some methods were using a specific decorator, it was a hell on earth, I'm not really a fan of dependency injection and this is one of the reasons haha
But in this text case, sometimes in a React application at some point, you need to have a component that talks with the external world, like in the example LaunchDarkly, and sometimes you can't just pass the function as a parameter, in my simplistic example here yes, but in real life not always, for instance, if this were a ReactHook, you can only call it in some specific points etc
To be frank this was the motivation I had to write this text