It's not claiming to be a 'plugin'. But if you want to attach a utill, he says it's fine to use the base lib and just attach it to the prototype. And I tend to agree in the case of Axios.
Vue.use() just checks if it wasn't already registered and calls the install() method. And in the docs (vuejs.org/v2/guide/plugins.html) is mentioned; "want to bind something to the instance?" -> Vue.prototype.$myMethod = ....
So I would argue there isn't a big difference. Just use it with care.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
It's not claiming to be a 'plugin'. But if you want to attach a utill, he says it's fine to use the base lib and just attach it to the prototype. And I tend to agree in the case of Axios.
Vue.use()
just checks if it wasn't already registered and calls theinstall()
method. And in the docs (vuejs.org/v2/guide/plugins.html) is mentioned; "want to bind something to the instance?" ->Vue.prototype.$myMethod = ...
.So I would argue there isn't a big difference. Just use it with care.