or npm.npm put in vue-bind-once-- conserve.Sign up regulation.import createApp coming from 'vue'.import Application coming from './ App.vue'.bring in BindOnceDirective, BindOncePlugin coming from 'vue-bind-once'.const app = createApp( App).app.use( BindOncePlugin).// or app.directive(' bind-once', BindOnceDirective).In most cases you'll be utilizing this directive along with an SSR-rendering structure like nuxt, which might possess a different technique for you to register this instruction. As an example, in a Nuxt plugin:.bring in BindOncePlugin coming from 'vue-bind-once'.export nonpayment defineNuxtPlugin( nuxtApp => nuxtApp.vueApp.use( BindOncePlugin). ).Use.You may now use the directive on any kind of component where you require a binding to a worth that needs to have to match between client/server however won't alter dynamically afterwards.
This will work on each web server and also on client re-hydration.