or npm.npm mount vue-bind-once-- conserve.Register instruction.bring in createApp coming from 'vue'.import App coming from './ App.vue'.import BindOnceDirective, BindOncePlugin from 'vue-bind-once'.const app = createApp( Application).app.use( BindOncePlugin).// or even app.directive(' bind-once', BindOnceDirective).In many cases you'll be using this directive along with an SSR-rendering framework like nuxt, which may have a various way for you to enroll this ordinance. For example, in a Nuxt plugin:.import BindOncePlugin coming from 'vue-bind-once'.export default defineNuxtPlugin( nuxtApp => nuxtApp.vueApp.use( BindOncePlugin). ).Consumption.You may currently utilize the instruction on any factor where you need a binding to a worth that needs to match between client/server yet will not alter dynamically later on.
This will certainly work with each web server and also on customer re-hydration.