fix: remove unnecessary v-once directives from dynamic components #600

Closed
opened 2026-04-05 16:21:44 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @Map1en on 1/13/2025

Removes inappropriate usage of v-once directives that were causing potential rendering issues and memory inefficiencies. The removed directives were mainly found in table columns and select options where content needs to be dynamic.

According to Vue 2's documentation #Cheap-Static-Components-with-v-once:

Once again, try not to overuse this pattern. While convenient in those rare cases when you have to render a lot of static content, it’s simply not necessary unless you actually notice slow rendering – plus, it could cause a lot of confusion later. For example, imagine another developer who’s not familiar with v-once or simply misses it in the template. They might spend hours trying to figure out why the template isn’t updating correctly.

Removing unnecessary v-once will:

  • Allow Vue's virtual DOM to properly diff and update components
  • Prevent memory leaks from holding onto initial render states
  • Eliminate the need for manual force updates
*Originally created by @Map1en on 1/13/2025* Removes inappropriate usage of `v-once` directives that were causing potential rendering issues and memory inefficiencies. The removed directives were mainly found in table columns and select options where content needs to be dynamic. According to [Vue 2's documentation #Cheap-Static-Components-with-v-once](https://v2.vuejs.org/v2/guide/components-edge-cases.html#Cheap-Static-Components-with-v-once): > Once again, try not to overuse this pattern. While convenient in those rare cases when you have to render a lot of static content, it’s simply not necessary unless you actually notice slow rendering – plus, it could cause a lot of confusion later. For example, imagine another developer who’s not familiar with v-once or simply misses it in the template. They might spend hours trying to figure out why the template isn’t updating correctly. Removing unnecessary `v-once` will: - Allow Vue's virtual DOM to properly diff and update components - Prevent memory leaks from holding onto initial render states - Eliminate the need for manual force updates
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/VRCX#600