Sleep

1 vue-bind-once - Vue.js Nourished #.\n\nA little, SSR-safe regulation for tiing random data to a factor.\n\nQuick Start.\nTo begin with mount vue-bind-once:.\nanecdote incorporate vue-bind-once.\n\n

or even npm.npm put up vue-bind-once-- save.Register directive.import createApp coming from 'vue'.import Application from './ App.vue'.bring in BindOnceDirective, BindOncePlugin coming from 'vue-bind-once'.const application = createApp( Application).app.use( BindOncePlugin).// or app.directive(' bind-once', BindOnceDirective).Most of the times you'll be actually utilizing this ordinance along with an SSR-rendering structure like nuxt, which might possess a different method for you to enroll this ordinance. For instance, in a Nuxt plugin:.import BindOncePlugin from 'vue-bind-once'.export default defineNuxtPlugin( nuxtApp =&gt nuxtApp.vueApp.use( BindOncePlugin). ).Usage.You can easily right now utilize the instruction on any type of component where you require a binding to a worth that needs to match between client/server however won't change dynamically after that.
This will definitely work with both hosting server as well as on client re-hydration.

Articles You Can Be Interested In