or even npm.npm set up vue-bind-once-- spare.Register ordinance.import createApp from 'vue'.bring in Application from './ App.vue'.import BindOnceDirective, BindOncePlugin coming from 'vue-bind-once'.const application = createApp( App).app.use( BindOncePlugin).// or even app.directive(' bind-once', BindOnceDirective).In many cases you'll be actually using this regulation along with an SSR-rendering structure like nuxt, which may possess a different technique for you to enroll this ordinance. For example, in a Nuxt plugin:.bring in BindOncePlugin from 'vue-bind-once'.export nonpayment defineNuxtPlugin( nuxtApp => nuxtApp.vueApp.use( BindOncePlugin). ).Usage.You can easily right now utilize the instruction on any aspect where you need a binding to a value that needs to match between client/server yet won't modify dynamically afterwards.
This will work with both web server as well as on customer re-hydration.