Design Patterns · Senior · Question 18 of 75

What is a Composition Root?

Explanation

Concrete implementations (API client, logger, storage) are created and wired at the entry point (main, a root layout with providers), and the rest of the code receives abstractions. This keeps dependencies visible and replaceable.

Further reading

Problem with a question

Design Patterns · Senior · question 18

Test yourself

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

Take this quiz