I'm currently working on a small VueJs SPA and the first time with VueJs 3. In the past you could add helpers, classes to the Vue instance simply by using prototype. With VueJs 3 this possibility was abolished and replaced with two new possibilities:
- provide / inject
- config.globalProperties
I personally find variant 2 charming because it is easy and quick to implement. With variant one, I don't really understand the concept. I wonder why you explicitly add the inject in the child componente and why it doesn't happen automatically. However.
Are there different application scenarios for using 1 and 2? I only ask because I find it strange to add helper classes under config. So weird from the naming.