DEV Community

Discussion on: Let's talk about an unnecessary but popular Vue plugin

Collapse
 
renzos profile image
Renzo • Edited

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.