or npm.npm install vue-bind-once-- conserve.Sign up regulation.import createApp coming from 'vue'.import App coming from './ App.vue'.bring in 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 using this directive along with an SSR-rendering framework like nuxt, which might possess a various method for you to register this ordinance. For instance, in a Nuxt plugin:.bring in BindOncePlugin from 'vue-bind-once'.export nonpayment defineNuxtPlugin( nuxtApp => nuxtApp.vueApp.use( BindOncePlugin). ).Use.You may right now use the instruction on any element where you need to have a binding to a worth that needs to have to match in between client/server yet will not change dynamically later on.
This will definitely focus on both server and on client re-hydration.