Handling Edge Cases

    Note

    All the features on this page document the handling of edge cases, meaning unusual situations that sometimes require bending Vue’s rules a little. Note however, that they all have disadvantages or situations where they could be dangerous. These are noted in each case, so keep them in mind when deciding to use each feature.

    If you find yourself needing to force an update in Vue, in 99.99% of cases, you’ve made a mistake somewhere. For example, you may be relying on state that isn’t tracked by Vue’s reactivity system, e.g. with property added after component creation.

    However, if you’ve ruled out the above and find yourself in this extremely rare situation of having to manually force an update, you can do so with .

    Cheap Static Components with v-once

    TIP

    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 or simply misses it in the template. They might spend hours trying to figure out why the template isn’t updating correctly.