or npm.npm put in vue-bind-once-- conserve.Register ordinance.bring in createApp coming from 'vue'.import App 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 most cases you'll be actually using this regulation along with an SSR-rendering structure like nuxt, which might have a various means for you to enroll this regulation. For instance, in a Nuxt plugin:.import BindOncePlugin coming from 'vue-bind-once'.export default defineNuxtPlugin( nuxtApp => nuxtApp.vueApp.use( BindOncePlugin). ).Consumption.You may right now make use of the directive on any type of aspect where you require a binding to a value that requires to match in between client/server however won't alter dynamically later on.
This will certainly focus on each server and also on client re-hydration.