or even npm.npm mount vue-bind-once-- conserve.Sign up instruction.bring in createApp from 'vue'.import Application coming from './ App.vue'.import BindOnceDirective, BindOncePlugin from 'vue-bind-once'.const app = createApp( App).app.use( BindOncePlugin).// or even app.directive(' bind-once', BindOnceDirective).In most cases you'll be using this directive along with an SSR-rendering platform like nuxt, which may possess a different means for you to register this ordinance. For instance, in a Nuxt plugin:.import BindOncePlugin from 'vue-bind-once'.export default defineNuxtPlugin( nuxtApp => nuxtApp.vueApp.use( BindOncePlugin). ).Utilization.You may now utilize the regulation on any kind of aspect where you need to have a binding to a worth that needs to match in between client/server yet won't alter dynamically afterwards.
This will definitely work with both web server and also on customer re-hydration.