Sleep

1 vue-bind-once - Vue.js Nourished #.\n\nA small, SSR-safe regulation for tiing random data to an element.\n\nFlying start.\nInitially mount vue-bind-once:.\nanecdote include vue-bind-once.\n\n

or npm.npm install vue-bind-once-- conserve.Register instruction.import createApp coming from 'vue'.bring in App from './ App.vue'.bring in BindOnceDirective, BindOncePlugin from 'vue-bind-once'.const application = createApp( Application).app.use( BindOncePlugin).// or even app.directive(' bind-once', BindOnceDirective).Most of the times you'll be utilizing this ordinance along with an SSR-rendering platform like nuxt, which might have a different way for you to register this directive. For instance, in a Nuxt plugin:.bring in BindOncePlugin from 'vue-bind-once'.export default defineNuxtPlugin( nuxtApp =&gt nuxtApp.vueApp.use( BindOncePlugin). ).Consumption.You may now make use of the instruction on any sort of element where you need a binding to a value that needs to have to match between client/server yet will not alter dynamically afterwards.
This will definitely service each hosting server as well as on client re-hydration.

Articles You Can Be Interested In