Sleep

1 vue-bind-once - Vue.js Nourished #.\n\nA little, SSR-safe regulation for binding arbitrary data to an element.\n\nFlying start.\nTo begin with put in vue-bind-once:.\nyarn add vue-bind-once.\n\n

or even npm.npm set up vue-bind-once-- save.Sign up directive.bring in createApp coming from 'vue'.import Application coming from './ App.vue'.bring in BindOnceDirective, BindOncePlugin coming from 'vue-bind-once'.const app = createApp( App).app.use( BindOncePlugin).// or app.directive(' bind-once', BindOnceDirective).In many cases you'll be utilizing this ordinance along with an SSR-rendering structure like nuxt, which might have a different means for you to register this instruction. For example, in a Nuxt plugin:.import BindOncePlugin from 'vue-bind-once'.export default defineNuxtPlugin( nuxtApp =&gt nuxtApp.vueApp.use( BindOncePlugin). ).Use.You can easily currently use the ordinance on any type of element where you need a binding to a worth that requires to match between client/server yet will not alter dynamically later on.
This will certainly work on both server and on customer re-hydration.

Articles You Can Be Interested In