Sleep

1 vue-bind-once - Vue.js Feed #.\n\nA tiny, SSR-safe regulation for tiing arbitrary information to an element.\n\nFlying start.\nInitially put up vue-bind-once:.\nanecdote add vue-bind-once.\n\n

or even npm.npm set up vue-bind-once-- spare.Sign up regulation.import createApp coming from 'vue'.bring in Application from './ App.vue'.import BindOnceDirective, BindOncePlugin from 'vue-bind-once'.const app = createApp( App).app.use( BindOncePlugin).// or app.directive(' bind-once', BindOnceDirective).Most of the times you'll be utilizing this regulation with an SSR-rendering framework like nuxt, which may possess a various method for you to enroll this ordinance. For example, in a Nuxt plugin:.import BindOncePlugin coming from 'vue-bind-once'.export default defineNuxtPlugin( nuxtApp =&gt nuxtApp.vueApp.use( BindOncePlugin). ).Utilization.You can currently use the ordinance on any sort of factor where you need a binding to a value that needs to have to match in between client/server however won't change dynamically later on.
This will certainly service both server as well as on client re-hydration.

Articles You Can Be Interested In