Sleep

1 vue-bind-once - Vue.js Nourished #.\n\nA small, SSR-safe regulation for tiing random information to an element.\n\nQuick Start.\nFirst install vue-bind-once:.\nanecdote add vue-bind-once.\n\n

or even npm.npm install vue-bind-once-- spare.Register directive.import createApp coming from 'vue'.import Application from './ App.vue'.import BindOnceDirective, BindOncePlugin from 'vue-bind-once'.const application = createApp( App).app.use( BindOncePlugin).// or app.directive(' bind-once', BindOnceDirective).In many cases you'll be utilizing this ordinance with an SSR-rendering platform like nuxt, which may possess a different way for you to register this directive. For instance, in a Nuxt plugin:.import BindOncePlugin coming from 'vue-bind-once'.export nonpayment defineNuxtPlugin( nuxtApp =&gt nuxtApp.vueApp.use( BindOncePlugin). ).Usage.You can currently utilize the regulation on any sort of component where you need a binding to a worth that needs to match in between client/server however will not transform dynamically afterwards.
This will service both web server and on customer re-hydration.

Articles You Can Be Interested In