Dependency injection - ProtonMail/proton-pack GitHub Wiki

Dependency injection

Prefer to inject dependencies using useContext into container components to facilitate sharing of code. For example an api function. This way the Application can provide different dependencies set up with different configurations and we don't need to change anything in the container.