Plugins
Plugins are a great way to provide extensibility to the Vue.js framework. As a matter of fact, Vuex and Vue Router, the two most widely-used core libraries in the Vue.js ecosystem, are plugins. And the validation framework that we will use in the TaskAgile app, Vuelidate, is also a Vue.js plugin.
Creating a plugin in Vue.js is simple. You create a plain object with an install() method. This method will take two arguments. The first one is the Vue constructor, which is where all of the extended functionalities will be applied, and the second one is an options object, which allows a plugin to define options that can be used to configure the plugin itself.
Inside the install() method, you can add a static method or property to the Vue ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access