Nuxt has useful convention that any plugin called get executed only on client side, and is only in SSR. You can have plugin that’s executed on both server and client side (thus twice total), or only on one side.
VUE LIFECYCLE CODE
Plugins are bits of code that get executed once or twice per visitor, before Vue.js app instance gets created. Note: many of the following methods accept Nuxt context as one of the parameters. They will only be processed (visible) in mounted. this.$refs, they are not initialised at this point. How does it matter? If you ever want to use e.g.
VUE LIFECYCLE SOFTWARE
One of the software development principles that we get taught very early in our dev careers is DRY - Don’t Repeat Yourself.