or even npm.npm set up vue-bind-once-- spare.Register regulation.bring in createApp coming from 'vue'.import Application coming from './ App.vue'.bring in BindOnceDirective, BindOncePlugin from 'vue-bind-once'.const app = createApp( App).app.use( BindOncePlugin).// or app.directive(' bind-once', BindOnceDirective).In many cases you'll be using this regulation along with an SSR-rendering framework like nuxt, which may have a various technique for you to enroll this directive. For example, in a Nuxt plugin:.import BindOncePlugin coming from 'vue-bind-once'.export default defineNuxtPlugin( nuxtApp => nuxtApp.vueApp.use( BindOncePlugin). ).Usage.You may now utilize the instruction on any aspect where you require a binding to a market value that requires to match between client/server however will not alter dynamically afterwards.
This will certainly work on both hosting server and also on customer re-hydration.