Sleep

1 vue-bind-once - Vue.js Supplied #.\n\nA tiny, SSR-safe instruction for tiing arbitrary information to a component.\n\nFlying start.\nInitially put in vue-bind-once:.\nanecdote incorporate vue-bind-once.\n\n

or even npm.npm install vue-bind-once-- spare.Sign up regulation.import createApp from 'vue'.bring in Application from './ App.vue'.import BindOnceDirective, BindOncePlugin from 'vue-bind-once'.const application = createApp( App).app.use( BindOncePlugin).// or app.directive(' bind-once', BindOnceDirective).Most of the times you'll be actually using this instruction along with an SSR-rendering structure like nuxt, which may have a various means for you to register this ordinance. For instance, in a Nuxt plugin:.import BindOncePlugin coming from 'vue-bind-once'.export nonpayment defineNuxtPlugin( nuxtApp =&gt nuxtApp.vueApp.use( BindOncePlugin). ).Use.You can easily now utilize the directive on any sort of element where you need to have a binding to a worth that requires to match between client/server but will not transform dynamically afterwards.
This will certainly deal with each server and also on customer re-hydration.

Articles You Can Be Interested In