or npm.npm mount vue-bind-once-- conserve.Sign up regulation.import createApp coming from 'vue'.import App from './ App.vue'.bring in BindOnceDirective, BindOncePlugin from 'vue-bind-once'.const application = createApp( Application).app.use( BindOncePlugin).// or even app.directive(' bind-once', BindOnceDirective).In many cases you'll be actually using this directive along with an SSR-rendering structure like nuxt, which may have a different technique for you to register this instruction. As an example, in a Nuxt plugin:.import BindOncePlugin coming from 'vue-bind-once'.export nonpayment defineNuxtPlugin( nuxtApp => nuxtApp.vueApp.use( BindOncePlugin). ).Use.You can currently make use of the directive on any kind of aspect where you need a binding to a worth that needs to match between client/server however will not alter dynamically later on.
This will definitely work with each web server as well as on client re-hydration.