Check out example codes for "vue transition v-if else". It will help you in understanding the concepts better.

Code Example 1

<div id="demo">
    <button v-on:click="show = !show">
        Toggle
    </button>
    <transition name="fade">
        <p key=1 v-if="show">hello</p>
        <p key=2 v-else>Goodbye</p>
    </transition>
</div>

Learn ReactJs, React Native from akashmittal.com