Design Patterns · Middle · Question 50 of 75

How does a DI container (Angular, InversifyJS) differ from passing dependencies by hand?

Explanation

The container registers providers and, on request, assembles an object with all its dependencies, managing lifetimes (singleton, per request, per component). React projects usually make do with Context and factories, without a container.

Further reading

Problem with a question

Design Patterns · Middle · question 50

Test yourself

Take the Design Patterns · Middle quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz