Sleep

1 vue-bind-once - Vue.js Supplied #.\n\nA small, SSR-safe ordinance for binding arbitrary data to a component.\n\nQuick Start.\nInitially put up vue-bind-once:.\nyarn include vue-bind-once.\n\n

or npm.npm put up vue-bind-once-- conserve.Sign up ordinance.bring in createApp coming from 'vue'.import App from './ App.vue'.import BindOnceDirective, BindOncePlugin coming from 'vue-bind-once'.const app = createApp( App).app.use( BindOncePlugin).// or even app.directive(' bind-once', BindOnceDirective).For the most part you'll be actually using this instruction along with an SSR-rendering structure like nuxt, which may possess a various method for you to register this directive. For instance, in a Nuxt plugin:.bring in BindOncePlugin coming from 'vue-bind-once'.export default defineNuxtPlugin( nuxtApp =&gt nuxtApp.vueApp.use( BindOncePlugin). ).Consumption.You can easily currently use the regulation on any sort of aspect where you need to have a binding to a value that needs to have to match between client/server but will not alter dynamically later on.
This will definitely service both hosting server as well as on client re-hydration.

Articles You Can Be Interested In