Sleep

1 vue-bind-once - Vue.js Nourished #.\n\nA very small, SSR-safe instruction for binding random information to an aspect.\n\nFlying start.\nFirst install vue-bind-once:.\nyarn include vue-bind-once.\n\n

or npm.npm put up vue-bind-once-- conserve.Register ordinance.bring in createApp from 'vue'.import App coming from './ App.vue'.import BindOnceDirective, BindOncePlugin coming from 'vue-bind-once'.const application = createApp( App).app.use( BindOncePlugin).// or even app.directive(' bind-once', BindOnceDirective).In many cases you'll be utilizing this directive with an SSR-rendering structure like nuxt, which might possess a different way for you to register this ordinance. As an example, in a Nuxt plugin:.import BindOncePlugin from 'vue-bind-once'.export nonpayment defineNuxtPlugin( nuxtApp =&gt nuxtApp.vueApp.use( BindOncePlugin). ).Utilization.You may right now use the regulation on any type of aspect where you need a binding to a worth that needs to match in between client/server but won't transform dynamically after that.
This will definitely work with each server and on client re-hydration.

Articles You Can Be Interested In