As we've already seen, dependency injection (DI) is a great pattern with huge benefits that helps us create loosely coupled elements. Let's look at how we can apply DI to Vue projects. This is something that's useful for us to understand and master.
Dependency injection
Built-in support
Unfortunately, out of the box, Vue doesn't provide much support for dependency injection in its current version.
However, Vue does include two options: provide and inject. They are described in the official documentation (https://vuejs.org/v2/api/#provide-inject). These two options are normally intended for plugin development, but can actually be used in any Vue application. We'll see that we can leverage them in our...