re: Let's talk about an unnecessary but popular Vue plugin VIEW POST

FULL DISCUSSION
 

Your examples are misleading as that is not the correct way to construct and load a Vue plugin

 
 

I'm not sure what you mean. Could you explain?

 

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.

code of conduct - report abuse