or even npm.npm put in vue-bind-once-- spare.Register instruction.import createApp from 'vue'.bring in App from './ App.vue'.import BindOnceDirective, BindOncePlugin coming from 'vue-bind-once'.const application = createApp( App).app.use( BindOncePlugin).// or app.directive(' bind-once', BindOnceDirective).Most of the times you'll be actually using this regulation along with an SSR-rendering structure like nuxt, which may have a different means for you to enroll this ordinance. As an example, in a Nuxt plugin:.bring in BindOncePlugin from 'vue-bind-once'.export nonpayment defineNuxtPlugin( nuxtApp => nuxtApp.vueApp.use( BindOncePlugin). ).Use.You can easily now make use of the instruction on any kind of element where you need a binding to a worth that needs to have to match in between client/server yet won't change dynamically afterwards.
This will work with both server and also on customer re-hydration.