or npm.npm mount vue-bind-once-- save.Register instruction.import createApp coming from 'vue'.bring in App coming from './ App.vue'.import BindOnceDirective, BindOncePlugin coming from 'vue-bind-once'.const app = createApp( App).app.use( BindOncePlugin).// or app.directive(' bind-once', BindOnceDirective).Most of the times you'll be using this directive with an SSR-rendering structure like nuxt, which may possess a different method for you to register this directive. For example, in a Nuxt plugin:.import BindOncePlugin from 'vue-bind-once'.export nonpayment defineNuxtPlugin( nuxtApp => nuxtApp.vueApp.use( BindOncePlugin). ).Consumption.You can currently use the regulation on any type of component where you require a binding to a value that needs to match between client/server yet won't transform dynamically later on.
This will certainly work on each server and also on client re-hydration.