Suggest an editImprove this articleRefine the answer for “What is v-pre used for?”. Your changes go to moderation before they’re published.Approval requiredContentWhat you’re changing🇺🇸EN🇺🇦UAPreviewTitle (EN)Short answer (EN)**`v-pre`** is a directive that tells Vue not to compile that part of the template: it disables processing of expressions (`{{ }}`, directives, etc.) and outputs the content as is. **Key point:** unlike `v-once`, which renders the template once and then freezes it, `v-pre` does not process the template at all.Shown above the full answer for quick recall.Answer (EN)ImageThe `v-pre` directive is used to **tell Vue: "do not compile this part of the template"**. In other words: > `v-pre` **disables processing of Vue expressions (**`{{ }}`**, directives, etc.) and just outputs the content as is.** --- ## What does `v-pre` do? #### Skips template compilation Vue **will not interpret**: - interpolations: `{{ message }}` - directives: `v-if`, `v-for`, `v-model` - any expressions #### Speeds up the first render Since Vue does not analyze the content, this can slightly improve performance in large templates. --- ## Usage example ```html <div v-pre> {{ this will not be interpolated }} </div> ``` The user will see: ``` {{ this will not be interpolated }} ``` In other words, Vue simply ignores the expression. --- ## Example: showing a code sample with mustache syntax If you need to display a Vue template inside Vue: ```html <pre v-pre> <code> {{ user.name }} </code> </pre> ``` Without `v-pre`, Vue would try to interpret `{{ user.name }}`. --- ## Example: speeding up the render of a static block ```html <div v-pre> <h2>Static block</h2> <p>This text does not depend on data and does not need processing.</p> </div> ``` Vue will not spend time analyzing it, so it renders faster. --- ## What can you not use with `v-pre`? You cannot put Vue directives inside it, because they will not be processed: ```html <div v-pre> <span v-if="isVisible">Will not work</span> </div> ``` --- ## Important to understand Do not confuse `v-pre` with: #### `v-once` - renders once, then updates further - Vue **processes the template**, but then freezes it #### `v-pre` - does not process the template at all - everything inside is treated like plain HTML/textFor the reviewerNote to the moderator (optional)Visible only to the moderator. Helps review go faster.