title: vuejs mounted is called even if component was not loaded via v-if
body: <p>I am using vuejs for my app look like this </p>
  
  <p>app.vue </p>
  
  <pre><code>&lt;template&gt;
  &lt;div&gt;
   &lt;custom-elem v-if="somefalseCondition"&gt; &lt;/custom-elem&gt;
  &lt;/div&gt;
  &lt;/template&gt;
  </code></pre>
  
  <p>CustomElem.vue</p>
  
  <pre><code>&lt;template&gt;
    some code
   &lt;/template&gt;
  &lt;script&gt; 
  export default {
   mounted(){
    console.log('demo')
  }
  }
  &lt;/script&gt;
  </code></pre>
  
  <p>I am expecting this mounted should be called when element is actually rendered on screen , but it is executing even after condition inside v-if is false , what am i missing here ? </p>