Question: Is there any reason that matching an empty list should be done using a case/match instead of if/else, other than style? For example:

```
val a: List

def compute: Int = 
  if (a.isEmpty) 0
  else a.sum

```

versus

```
def compute: Int = 
  a match {
    case Nil => 0
    case _ => a.sum // This is bad. For sake of illustration only.
  }

```

Answer: 
Using `v-if`, re-renders components every time the `this.mode` changes. Vue stores them in virtual DOM, but re-renders them if you use `v-if`.

If you have access to code for these components, consider using `prop` for `v-show` and watching it, in optional combination with `emit`so you can communicate between parent and child components, and set flag if you need it in child and in parent component if child component loads animation initially, to avoid loading it all over again. 

This would be one of the child components: 

```
<template>
    <div v-show="mode === 'themode'">

    </div>
</template>
<script>

    export default {
        props: {
            mode: {
                type: Boolean,
                required: true,
                twoWay: true
            },
        },
        data()  {
            return {
                animationLoaded : false,
            }
        },
        mounted(){

        },
         watch: {
           'mode' : function(){
            if(this.mode === 'mode' && this.animationLoaded === false){
                //load animation and set flag to true, to avoid loading it again. 
                this.animationLoaded = true; 
                this.$root.$emit('component-name:animation-loaded');
            }
          }
        },

```

...

And putting child in parent component: 

```
  <child-component :mode.sync="mode"></child-component>

```
If created() doesn't do the job, you should try to do a simple check in the parent element if this.mode was switched on and off before, save the result as a variable and pass that to the mounted hook and only run the animation if the mode wasn't switched before.