Vue · Senior · Question 69 of 75
Why is a global app.provide() often better than globalProperties for app-wide services?
- ✓Correct answer: Injected values are explicit, typed with
InjectionKey, and easy to override in tests or subtrees - 2
globalPropertiesdon't work in templates - 3
app.provideis faster
Explanation
globalProperties are implicit this additions mostly suited to the Options API.