Getting Started with Vue.js Plugins [Production-Ready Example]
Francis Cote
Posted on September 13, 2018
It's no secret that we <3 Vue.js.
So much so that it's a key part of our own product's rewriting.
In the last months, we've learned a lot about Vue. From building SEO-friendly SPAs to crafting killer blogs or playing with transitions & animations, we've experimented with the framework thoroughly.
But there's a missing piece in there:
Something most proponents of the framework will have to work with is Vue.js plugins.
For my own pleasure (and yours, hopefully) I crafted a custom plugin to show you how it's done in a step-by-step tutorial.
I'll also use this post to answer important Vue plugins questions:
- What's a plugin?
- What are they useful for?
- What are the popular Vue.js plugins?
Time for the magic!
A short story of Vue.js plugins
What exactly is a plugin?
Plugins aren't something specific to Vue.js, and you'll usually find them in a large range of software. By definition, they indicate that an interface is provided to allow for extensibility.
In other, simpler words, they're a way to add global features to an app.
In Vue.js, a plugin should expose an install
method that takes two parameters:
- The global
Vue
object. - An object incorporating user-defined options.
Good news is they're not that intimidating. Basic knowledge of Vue.js will let you start fiddling with plugins right away.
β Read the full post & technical tutorial here
Posted on September 13, 2018
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.