or npm.npm install vue-bind-once-- save.Sign up regulation.import createApp from 'vue'.import Application coming from './ App.vue'.import BindOnceDirective, BindOncePlugin coming from 'vue-bind-once'.const app = createApp( App).app.use( BindOncePlugin).// or even app.directive(' bind-once', BindOnceDirective).In most cases you'll be actually utilizing this instruction with an SSR-rendering framework like nuxt, which might have a various technique for you to enroll this regulation. As an example, in a Nuxt plugin:.bring in BindOncePlugin coming from 'vue-bind-once'.export nonpayment defineNuxtPlugin( nuxtApp => nuxtApp.vueApp.use( BindOncePlugin). ).Usage.You can easily currently utilize the ordinance on any type of aspect where you need a binding to a value that needs to match in between client/server but will not change dynamically afterwards.
This will certainly service each web server and on customer re-hydration.