DEV Community

Discussion on: Dependency Injection /Services pattern for React (inspired by Angular)

 
dansolhan profile image
Daniel Sollie Hansen

If I get you correctly, you're worried that you'll clog the template with services? My solution to this was to put all Services inside a GlobalServices that is then wrapped around the App. Does that answer your question?

Thread Thread
 
gobieljonathan profile image
Jonathan Gobiel

yeah it's good solution, but there's any approach method to make Dependecy Injection without using context?

Thread Thread
 
dansolhan profile image
Daniel Sollie Hansen

I'd assume so! If you check my comments, you can see that Jack has made a solution that seems very viable!