or even npm.npm mount vue-bind-once-- spare.Register regulation.bring in createApp from 'vue'.bring in App coming from './ App.vue'.import BindOnceDirective, BindOncePlugin from 'vue-bind-once'.const application = createApp( Application).app.use( BindOncePlugin).// or app.directive(' bind-once', BindOnceDirective).Most of the times you'll be actually utilizing this directive with an SSR-rendering structure like nuxt, which may have a different means for you to enroll this ordinance. For instance, in a Nuxt plugin:.import BindOncePlugin coming from 'vue-bind-once'.export nonpayment defineNuxtPlugin( nuxtApp => nuxtApp.vueApp.use( BindOncePlugin). ).Usage.You can easily currently make use of the regulation on any kind of element where you require a binding to a worth that needs to match between client/server however won't change dynamically after that.
This will definitely service both server and also on client re-hydration.