VOOZH about

URL: https://www.geeksforgeeks.org/javascript/vue-js-v-once-directive/

⇱ Vue.js v-once Directive - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Vue.js v-once Directive

Last Updated : 15 Jul, 2025

The v-once directive is a Vue.js directive that is used to avoid unwanted re-renders of an element. It treats the element as a static content after rendering it once for the first time. This improves performance as it does not have to be rendered again. First, we will create a div element with the id of choice. The v-once directive is then applied to this element to make it render only once.

Syntax:

v-once

Parameters: This function does not accept any parameter.
Example: This example uses Vue.js to show the working of the data with v-once.

Output:

👁 Image
Comment
Article Tags: