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

Code Example 1

<div v-if="Math.random() > 0.5">
  Now you see me
</div>
<div v-else>
  Now you don't
</div>

Code Example 2

<span v-for="role in user.roles">
    <span v-if="role.name == 'Admin'">Yes</span>
    <span v-else>-</span>
</span>

Code Example 3

<template v-if="condition">
</template>
<template v-else>
</template>

Learn ReactJs, React Native from akashmittal.com