or even npm.npm mount vue-bind-once-- save.Register ordinance.bring in createApp from 'vue'.import 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).In most cases you'll be actually using this directive with an SSR-rendering structure like nuxt, which might have a different technique for you to enroll this instruction. For example, in a Nuxt plugin:.bring in BindOncePlugin from 'vue-bind-once'.export default defineNuxtPlugin( nuxtApp => nuxtApp.vueApp.use( BindOncePlugin). ).Usage.You can currently utilize the instruction on any kind of element where you require a binding to a worth that needs to match between client/server yet will not transform dynamically afterwards.
This will certainly work with each server and also on client re-hydration.