title: Vue.js computed functions with external objects
body: <p>Is it possible to use Vue's <code>computed</code> property with an external object?</p>
  <p>To show what I mean, here is a code example of how I imagine it:</p>
  <pre class="lang-js prettyprint-override"><code>&lt;!-- Vue file --&gt;
  
  &lt;template&gt;
      &lt;div&gt;{{data.auth}}&lt;/div&gt;
  &lt;/template&gt;
  
  &lt;script&gt;
  import {_data} form &quot;./data&quot;
  
  export default {
      computed: {
          data() { return _data }
      }
  }
  &lt;/script&gt;
  
  &lt;!-- data.js file --&gt;
  
  let _auth = &quot;123&quot;;
  
  export let _data = {
     auth: _auth
  }
  
  setTimeOut(() =&gt; _auth = &quot;456&quot;, 2000)
  </code></pre>
  <p>What I would expect from this code is that the HTML document changes after 2000ms from &quot;123&quot; to &quot;456&quot;.</p>
  <p>But as far as I can say this doesn't work.</p>