[{"data":1,"prerenderedAt":680},["ShallowReactive",2],{"menu-latest-post-en":3,"menu-latest-case-study-en":8,"blog-getting-started-with-vue3-plugins-what-you-need-to-know-en":14,"article-copy-en":569,"counterpart-en-\u002Fen\u002Fblog\u002Fgetting-started-with-vue3-plugins-what-you-need-to-know":599,"blog-related-en-\u002Fblog\u002Fgetting-started-with-vue3-plugins-what-you-need-to-know":600},{"slug":4,"title":5,"date":6,"cover":7},"what-makes-a-website-actually-convert","What makes a website actually sell (and why most don't)","2026-05-14","convert",{"slug":9,"client":10,"date":11,"text":12,"image":13},"rawia-rawicz","Rawia Rawicz","2026-08-01","Match photos for the club's everyday communication","\u002Fimages\u002Frawia-rawicz\u002Fhero.jpg",{"page":15,"isFallback":568},{"id":16,"title":17,"author":18,"body":22,"category":548,"cover":549,"date":550,"description":551,"extension":552,"href":553,"image":553,"lede":553,"localeUrls":554,"meta":558,"minRead":183,"navigation":186,"path":559,"seo":560,"sitemap":561,"source":553,"stem":562,"summary":563,"tags":564,"talkBand":553,"translationKey":566,"__hash__":567},"blogEn\u002Fblog\u002Fgetting-started-with-vue3-plugins-what-you-need-to-know.md","Getting Started with Vue 3 Plugins: What You Need to Know",{"name":19,"avatar":20},"Daniel Kasperczyk",{"src":21,"alt":19},"\u002Fimages\u002Fdanielkasperczyk.avif",{"type":23,"value":24,"toc":539},"minimark",[25,29,32,37,40,76,88,93,99,103,138,142,509,513,528,532,535],[26,27,28],"p",{},"Have you ever wondered what Vue plugins are and how they can enhance your project or improve your skills as a Vue developer? If so, you're in the right place!",[26,30,31],{},"In this article, I’ll break it down so you will have clear view of how plugins can impact your project.",[33,34,36],"h2",{"id":35},"when-vue-executes-plugins","When does vue execute plugins?",[26,38,39],{},"Before discussing performance and best practices, let's first understand how Vue 3 executes plugins:",[41,42,43,52,63,73],"ol",{},[44,45,46,47,51],"li",{},"Vue initializes the app with ",[48,49,50],"code",{},"createApp(App)",".",[44,53,54,55,58,59],{},"Plugins are installed via ",[48,56,57],{},"app.use(plugin)",". 🚀 ",[60,61,62],"em",{},"(This happens before rendering!)",[44,64,65,68,69,72],{},[48,66,67],{},"App.vue"," is mounted, executing its ",[48,70,71],{},"setup()"," function.",[44,74,75],{},"Child components start rendering.",[26,77,78,79,82,83,87],{},"This means that if you use a ",[48,80,81],{},"provide()"," in App.vue to share functionalities or information for example about auth, it only becomes available ",[84,85,86],"strong",{},"after"," App.vue is mounted, whereas a plugin runs before rendering begins.",[89,90,92],"h3",{"id":91},"why-does-this-matter","Why does this matter?",[26,94,95,96,51],{},"If your app depends on globally available data (such as authentication state), a plugin ensures that data is available ",[84,97,98],{},"before rendering begins",[33,100,102],{"id":101},"why-plugins","Why plugins are beneficial?",[41,104,105,114,122,130],{},[44,106,107,110,113],{},[84,108,109],{},"Separation of Concerns = Better Optimization",[111,112],"br",{},"Keeping global logic (like auth, API clients, or an event bus) inside a plugin removes it from the UI rendering cycle, reducing unnecessary reactivity.",[44,115,116,119,121],{},[84,117,118],{},"Ensures Global State is Ready Before Rendering",[111,120],{},"For example, a theme management plugin ensures UI settings are loaded before the app starts rendering.",[44,123,124,127,129],{},[84,125,126],{},"Performance Optimization",[111,128],{},"Plugins reduce unnecessary reactivity overhead, unlike provide\u002Finject inside App.vue, which may trigger unwanted re-renders.",[44,131,132,135,137],{},[84,133,134],{},"Easier Scalability for Large Apps",[111,136],{},"As your app grows, keeping global logic inside plugins makes the code modular and easier to maintain. For example, a feature management plugin can dynamically enable or disable features.",[33,139,141],{"id":140},"custom-plugin","Creating a custom Plugin",[143,144,149],"pre",{"className":145,"code":146,"language":147,"meta":148,"style":148},"language-ts shiki shiki-themes github-dark","\u002F\u002F plugins\u002Fauth.ts\nimport { reactive, computed } from 'vue';\n\nexport default {\n  install(app) {\n\n    \u002F\u002F Define reactive authentication state\n    const authState = reactive({\n      user: null,\n      token: localStorage.getItem(\"token\") || null,\n    });\n    \n    \u002F\u002F Mock login function\n    const login = async (credentials) => {\n      authState.token = \"mocked-jwt-token\";\n      localStorage.setItem(\"token\", authState.token); \u002F\u002F Could use sessionStorage or cookies\n      authState.user = { id: 1, name: \"John Doe\" };\n    };\n\n    \u002F\u002F Provide computed properties for better performance\n    const auth = {\n      user: computed(() => authState.user),\n      token: computed(() => authState.token),\n      login,\n    };\n    \n    \u002F\u002F Provide authentication globally\n    app.provide(\"auth\", auth);\n    app.config.globalProperties.$auth = auth; \u002F\u002F Optional\n  }\n};\n","ts","",[48,150,151,160,181,188,200,217,222,228,247,259,284,290,296,302,328,342,361,384,390,395,401,413,429,444,450,455,460,466,483,497,503],{"__ignoreMap":148},[152,153,156],"span",{"class":154,"line":155},"line",1,[152,157,159],{"class":158},"sAwPA","\u002F\u002F plugins\u002Fauth.ts\n",[152,161,163,167,171,174,178],{"class":154,"line":162},2,[152,164,166],{"class":165},"snl16","import",[152,168,170],{"class":169},"s95oV"," { reactive, computed } ",[152,172,173],{"class":165},"from",[152,175,177],{"class":176},"sU2Wk"," 'vue'",[152,179,180],{"class":169},";\n",[152,182,184],{"class":154,"line":183},3,[152,185,187],{"emptyLinePlaceholder":186},true,"\n",[152,189,191,194,197],{"class":154,"line":190},4,[152,192,193],{"class":165},"export",[152,195,196],{"class":165}," default",[152,198,199],{"class":169}," {\n",[152,201,203,207,210,214],{"class":154,"line":202},5,[152,204,206],{"class":205},"svObZ","  install",[152,208,209],{"class":169},"(",[152,211,213],{"class":212},"s9osk","app",[152,215,216],{"class":169},") {\n",[152,218,220],{"class":154,"line":219},6,[152,221,187],{"emptyLinePlaceholder":186},[152,223,225],{"class":154,"line":224},7,[152,226,227],{"class":158},"    \u002F\u002F Define reactive authentication state\n",[152,229,231,234,238,241,244],{"class":154,"line":230},8,[152,232,233],{"class":165},"    const",[152,235,237],{"class":236},"sDLfK"," authState",[152,239,240],{"class":165}," =",[152,242,243],{"class":205}," reactive",[152,245,246],{"class":169},"({\n",[152,248,250,253,256],{"class":154,"line":249},9,[152,251,252],{"class":169},"      user: ",[152,254,255],{"class":236},"null",[152,257,258],{"class":169},",\n",[152,260,262,265,268,270,273,276,279,282],{"class":154,"line":261},10,[152,263,264],{"class":169},"      token: localStorage.",[152,266,267],{"class":205},"getItem",[152,269,209],{"class":169},[152,271,272],{"class":176},"\"token\"",[152,274,275],{"class":169},") ",[152,277,278],{"class":165},"||",[152,280,281],{"class":236}," null",[152,283,258],{"class":169},[152,285,287],{"class":154,"line":286},11,[152,288,289],{"class":169},"    });\n",[152,291,293],{"class":154,"line":292},12,[152,294,295],{"class":169},"    \n",[152,297,299],{"class":154,"line":298},13,[152,300,301],{"class":158},"    \u002F\u002F Mock login function\n",[152,303,305,307,310,312,315,318,321,323,326],{"class":154,"line":304},14,[152,306,233],{"class":165},[152,308,309],{"class":205}," login",[152,311,240],{"class":165},[152,313,314],{"class":165}," async",[152,316,317],{"class":169}," (",[152,319,320],{"class":212},"credentials",[152,322,275],{"class":169},[152,324,325],{"class":165},"=>",[152,327,199],{"class":169},[152,329,331,334,337,340],{"class":154,"line":330},15,[152,332,333],{"class":169},"      authState.token ",[152,335,336],{"class":165},"=",[152,338,339],{"class":176}," \"mocked-jwt-token\"",[152,341,180],{"class":169},[152,343,345,348,351,353,355,358],{"class":154,"line":344},16,[152,346,347],{"class":169},"      localStorage.",[152,349,350],{"class":205},"setItem",[152,352,209],{"class":169},[152,354,272],{"class":176},[152,356,357],{"class":169},", authState.token); ",[152,359,360],{"class":158},"\u002F\u002F Could use sessionStorage or cookies\n",[152,362,364,367,369,372,375,378,381],{"class":154,"line":363},17,[152,365,366],{"class":169},"      authState.user ",[152,368,336],{"class":165},[152,370,371],{"class":169}," { id: ",[152,373,374],{"class":236},"1",[152,376,377],{"class":169},", name: ",[152,379,380],{"class":176},"\"John Doe\"",[152,382,383],{"class":169}," };\n",[152,385,387],{"class":154,"line":386},18,[152,388,389],{"class":169},"    };\n",[152,391,393],{"class":154,"line":392},19,[152,394,187],{"emptyLinePlaceholder":186},[152,396,398],{"class":154,"line":397},20,[152,399,400],{"class":158},"    \u002F\u002F Provide computed properties for better performance\n",[152,402,404,406,409,411],{"class":154,"line":403},21,[152,405,233],{"class":165},[152,407,408],{"class":236}," auth",[152,410,240],{"class":165},[152,412,199],{"class":169},[152,414,416,418,421,424,426],{"class":154,"line":415},22,[152,417,252],{"class":169},[152,419,420],{"class":205},"computed",[152,422,423],{"class":169},"(() ",[152,425,325],{"class":165},[152,427,428],{"class":169}," authState.user),\n",[152,430,432,435,437,439,441],{"class":154,"line":431},23,[152,433,434],{"class":169},"      token: ",[152,436,420],{"class":205},[152,438,423],{"class":169},[152,440,325],{"class":165},[152,442,443],{"class":169}," authState.token),\n",[152,445,447],{"class":154,"line":446},24,[152,448,449],{"class":169},"      login,\n",[152,451,453],{"class":154,"line":452},25,[152,454,389],{"class":169},[152,456,458],{"class":154,"line":457},26,[152,459,295],{"class":169},[152,461,463],{"class":154,"line":462},27,[152,464,465],{"class":158},"    \u002F\u002F Provide authentication globally\n",[152,467,469,472,475,477,480],{"class":154,"line":468},28,[152,470,471],{"class":169},"    app.",[152,473,474],{"class":205},"provide",[152,476,209],{"class":169},[152,478,479],{"class":176},"\"auth\"",[152,481,482],{"class":169},", auth);\n",[152,484,486,489,491,494],{"class":154,"line":485},29,[152,487,488],{"class":169},"    app.config.globalProperties.$auth ",[152,490,336],{"class":165},[152,492,493],{"class":169}," auth; ",[152,495,496],{"class":158},"\u002F\u002F Optional\n",[152,498,500],{"class":154,"line":499},30,[152,501,502],{"class":169},"  }\n",[152,504,506],{"class":154,"line":505},31,[152,507,508],{"class":169},"};\n",[33,510,512],{"id":511},"when-to-create","When to create custom plugins?",[514,515,516,519,522,525],"ul",{},[44,517,518],{},"You need global dependencies such as authentication, API clients, event bus, or theme management.",[44,520,521],{},"You need access to certain data before rendering begins.",[44,523,524],{},"You are using Server-Side Rendering (SSR).",[44,526,527],{},"You want better scalability and reusability.",[33,529,531],{"id":530},"final-thoughts","Final thoughts",[26,533,534],{},"Vue plugins are a powerful way to enhance your application's architecture by keeping global logic modular, improving performance, and ensuring critical dependencies are available before rendering. Whether you're managing authentication, API clients, or theme settings, using plugins can make your codebase more scalable and maintainable.",[536,537,538],"style",{},"html pre.shiki code .sAwPA, html code.shiki .sAwPA{--shiki-default:#6A737D}html pre.shiki code .snl16, html code.shiki .snl16{--shiki-default:#F97583}html pre.shiki code .s95oV, html code.shiki .s95oV{--shiki-default:#E1E4E8}html pre.shiki code .sU2Wk, html code.shiki .sU2Wk{--shiki-default:#9ECBFF}html pre.shiki code .svObZ, html code.shiki .svObZ{--shiki-default:#B392F0}html pre.shiki code .s9osk, html code.shiki .s9osk{--shiki-default:#FFAB70}html pre.shiki code .sDLfK, html code.shiki .sDLfK{--shiki-default:#79B8FF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}",{"title":148,"searchDepth":162,"depth":162,"links":540},[541,544,545,546,547],{"id":35,"depth":162,"text":36,"children":542},[543],{"id":91,"depth":183,"text":92},{"id":101,"depth":162,"text":102},{"id":140,"depth":162,"text":141},{"id":511,"depth":162,"text":512},{"id":530,"depth":162,"text":531},"vue","plugins","2025-03-31","What Vue 3 plugins are, when Vue runs them, why they help with performance and global state, and how to write a custom authentication plugin.","md",null,{"pl":555,"en":556,"self":557},"\u002Fblog\u002Fpluginy-w-vue3-od-czego-zaczac","\u002Fen\u002Fblog\u002Fgetting-started-with-vue3-plugins-what-you-need-to-know","en",{},"\u002Fblog\u002Fgetting-started-with-vue3-plugins-what-you-need-to-know",{"title":17,"description":551},{"loc":559,"lastmod":550},"blog\u002Fgetting-started-with-vue3-plugins-what-you-need-to-know","Vue 3 plugin architecture: the plugin lifecycle, performance optimisation and managing global state in large applications.",[565],"Plugins","getting-started-with-vue3-plugins-what-you-need-to-know","1DzPSO7KR7nhlYXZoOBB3tK3IKmvANa7v-c3kszOVKU",false,{"page":570,"isFallback":568},{"id":571,"title":572,"always":553,"blogArticle":573,"blogList":575,"body":553,"bundle":553,"caseStudies":553,"caseStudiesList":553,"collaboration":553,"collaborationHero":553,"contact":553,"description":583,"extension":584,"faq":553,"hero":553,"inquiryResult":553,"meta":585,"navigation":186,"og":586,"ongoing":553,"overview":553,"path":588,"pricingFaq":553,"problem":553,"process":553,"projects":553,"seo":589,"services":553,"stem":591,"street":553,"talkBands":592,"testimonials":553,"__hash__":598},"pagesEn\u002Fpages\u002Fblog.yml","A blog about websites, AI and code",{"authorBio":574},"Full stack developer from Rawicz, at Monterail since 2022. I help local businesses win customers with websites, AI automation and reels.",{"heading":576,"accent":577,"lede":578,"filterLabel":579,"all":580,"listLabel":581,"empty":582},"A blog","about websites, AI and code","I write about how websites and automation bring customers to local businesses. I also share practical tips from my work. From web technologies to photography, photo and video editing, and social media.","Filter articles","All","Articles","No articles in this category.","Articles on how websites and AI bring customers to local businesses, plus practical Vue.js guides. Daniel Kasperczyk, Rawicz.","yml",{},{"image":587},"[OG_IMAGE_URL]","\u002Fpages\u002Fblog",{"title":590,"description":583},"Blog | Daniel Kasperczyk, websites and AI for local businesses","pages\u002Fblog",{"blog":593,"article":596},{"text":594,"cta":595},"Got a question about your website, or a topic for an article? Write to me.","Book a call",{"text":597,"cta":595},"Got a question after reading, or want to put this to work for your business? Let's talk on a free call.","EIkM5CgTfJJ5zUfsBdDNJlJZo0ySNSn5goqR9RhaK_M",{"pl":555,"en":556,"self":557},[601,628,655],{"id":602,"title":603,"author":604,"body":606,"category":548,"cover":610,"date":611,"description":612,"extension":552,"href":613,"image":553,"lede":553,"localeUrls":614,"meta":617,"minRead":330,"navigation":186,"path":618,"seo":619,"sitemap":620,"source":621,"stem":622,"summary":623,"tags":624,"talkBand":553,"translationKey":626,"__hash__":627},"blogEn\u002Fblog\u002Fvue3-dynamic-components-explained-comprehensive-guide.md","Vue 3 Dynamic Components Explained: Comprehensive Guide",{"name":19,"avatar":605},{"src":21,"alt":19},{"type":23,"value":607,"toc":608},[],{"title":148,"searchDepth":162,"depth":162,"links":609},[],"components","2025-09-17","One of the powerful features leveraged by experienced Vue.js developers is the ability to use dynamic components, which significantly enhance the interactivity and modularity of web applications. With dynamic Vue components, teams mastering Vue.js services can effortlessly switch between elements within a single template, ensuring a more streamlined and maintainable codebase.","https:\u002F\u002Fwww.monterail.com\u002Fblog\u002Funderstanding-dynamic-components-in-vue-3",{"pl":615,"en":616,"self":557},"\u002Fblog\u002Fkomponenty-dynamiczne-w-vue3","\u002Fen\u002Fblog\u002Fvue3-dynamic-components-explained-comprehensive-guide",{},"\u002Fblog\u002Fvue3-dynamic-components-explained-comprehensive-guide",{"title":603,"description":612},{"loc":618,"lastmod":611},"Monterail","blog\u002Fvue3-dynamic-components-explained-comprehensive-guide","How dynamic components in Vue 3 let you switch elements within a single template and keep your code modular and easy to maintain.",[625],"Components","vue3-dynamic-components-explained-comprehensive-guide","BpdIbsVHsyGwOqPRaYTr3JX06S-a_IF-GOEE1bzq4D4",{"id":629,"title":630,"author":631,"body":633,"category":548,"cover":637,"date":638,"description":639,"extension":552,"href":640,"image":553,"lede":553,"localeUrls":641,"meta":644,"minRead":330,"navigation":186,"path":645,"seo":646,"sitemap":647,"source":621,"stem":648,"summary":649,"tags":650,"talkBand":553,"translationKey":653,"__hash__":654},"blogEn\u002Fblog\u002Fvuejs-optimization-boost-your-app-performance-with-vue-directives.md","Vue.js Optimization: Boost Your App Performance with Vue Directives",{"name":19,"avatar":632},{"src":21,"alt":19},{"type":23,"value":634,"toc":635},[],{"title":148,"searchDepth":162,"depth":162,"links":636},[],"directives","2025-09-15","Vue.js directives are essential and powerful tools that help developers easily create dynamic, responsive user interfaces. They are crucial in managing tasks like conditional rendering, event handling, and binding dynamic data, making them indispensable for crafting interactive applications.","https:\u002F\u002Fwww.monterail.com\u002Fblog\u002Fvue-js-optimization-with-vue-directives",{"pl":642,"en":643,"self":557},"\u002Fblog\u002Foptymalizacja-vue-z-dyrektywami","\u002Fen\u002Fblog\u002Fvuejs-optimization-boost-your-app-performance-with-vue-directives",{},"\u002Fblog\u002Fvuejs-optimization-boost-your-app-performance-with-vue-directives",{"title":630,"description":639},{"loc":645,"lastmod":638},"blog\u002Fvuejs-optimization-boost-your-app-performance-with-vue-directives","Vue directives in practice: conditional rendering, event handling and data binding in interactive interfaces.",[651,652],"Directives","Performance","vuejs-optimization-boost-your-app-performance-with-vue-directives","o8-XDZcqC0iqIzPaeLjU1Rkesuu1soxvqRit76vuKmg",{"id":656,"title":657,"author":658,"body":660,"category":548,"cover":664,"date":665,"description":666,"extension":552,"href":667,"image":553,"lede":553,"localeUrls":668,"meta":671,"minRead":330,"navigation":186,"path":672,"seo":673,"sitemap":674,"source":621,"stem":675,"summary":676,"tags":677,"talkBand":553,"translationKey":678,"__hash__":679},"blogEn\u002Fblog\u002Fhow-to-maximize-vuejs-performance-4-proven-techniques-for-faster-web-apps.md","How to Maximize Vue.js Performance: 4 Proven Techniques for Faster Web Apps",{"name":19,"avatar":659},{"src":21,"alt":19},{"type":23,"value":661,"toc":662},[],{"title":148,"searchDepth":162,"depth":162,"links":663},[],"performance","2025-08-27","Web app performance is crucial to delivering a great user experience. When working with Vue.js, ensuring your application is fast, smooth, and responsive is key. Even a beautifully designed app can feel sluggish if it’s not properly optimized, leading to user frustration and disengagement.","https:\u002F\u002Fwww.monterail.com\u002Fblog\u002Fhow-to-maximize-vue-js-performance-proven-techniques",{"pl":669,"en":670,"self":557},"\u002Fblog\u002Fwydajnosc-vuejs-4-sprawdzone-techniki","\u002Fen\u002Fblog\u002Fhow-to-maximize-vuejs-performance-4-proven-techniques-for-faster-web-apps",{},"\u002Fblog\u002Fhow-to-maximize-vuejs-performance-4-proven-techniques-for-faster-web-apps",{"title":657,"description":666},{"loc":672,"lastmod":665},"blog\u002Fhow-to-maximize-vuejs-performance-4-proven-techniques-for-faster-web-apps","Four proven techniques that make Vue.js apps faster, smoother and more responsive to their users.",[652],"how-to-maximize-vuejs-performance-4-proven-techniques-for-faster-web-apps","B09zIVM9UM97Vs8hqu4HnYFfc2PeXfxifbZaNAuh9Qw",1796040773625]