title: In Vue.js, why isn't my computed property working
body: <p>In the following code:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>new Vue({
    el: '#app',
    computed: {
      myMessage: function() {
        return "hello";
      }
    },
    data: {
      message: this.myMessage
    },
    mounted: function() {
      console.log(this.myMessage);
    }
  })</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://unpkg.com/vue"&gt;&lt;/script&gt;
  
  &lt;div id="app"&gt;
    &lt;p&gt;{{ message }}&lt;/p&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p><a href="https://jsfiddle.net/hk49eL38/" rel="nofollow noreferrer">https://jsfiddle.net/hk49eL38/</a></p>
  
  <p>if I replace:</p>
  
  <p><code>this.myMessage</code> with a string (eg "Hello world"), it renders correctly.</p>
  
  <p>But when I use <code>this.myMessage</code>, no text is rendered.</p>
  
  <p>Why is this?</p>