title: Vuesjs 3 computed function in composition returns refImpl
body: <p>i'm trying to use a computed function in Vuejs 3 externalized in a .js file using composition.</p>
  <p>Here my .vue file, it's very simple : a count variable that is incremented to trigger the computed function.</p>
  <pre class="lang-html prettyprint-override"><code>&lt;template&gt;
    &lt;div&gt;
      {{ computedCount }}
    &lt;/div&gt;
  &lt;/template&gt;
  
  &lt;script setup&gt;
  import { ref } from 'vue'
  import useComputedValue from './js/useComputed' // Import computed function
  
  const count = ref(0) // Instanciate the count variable
  count.value += 1 // Trigger the compute
  const computedCount = useComputedValue(count)
  console.debug(computedCount)
  &lt;/script&gt;
  
  </code></pre>
  <p>And here is my useComputed.js file :</p>
  <pre class="lang-js prettyprint-override"><code>import { computed } from 'vue'
  
  export default function useComputedValue(count) {
    const computedValue = computed(() =&gt; count.value * 5)
    return {
      computedValue,
    }
  }
  
  </code></pre>
  <p>The function simply mutliply the value given in parameter by 5.
  The problem is that the console.log(computedCount) gives a</p>
  <pre class="lang-js prettyprint-override"><code>{computedValue: ComputedRefImpl}
  computedValue: ComputedRefImpl {dep: Set(1), _dirty: false, __v_isRef: true, effect: ReactiveEffect, _setter: ƒ, …}
  [[Prototype]]: Object
  
  </code></pre>
  <p>And in the template, it displays { &quot;computedValue&quot;: 5 }
  <strong>So, the function doesn't return the value of the multiplied by 5 parameter, but a wrapper object refImpl.</strong></p>
  <p>The exemple is adapted from the documentation : <a href="https://v3.vuejs.org/guide/composition-api-introduction.html#standalone-computed-properties" rel="nofollow noreferrer">Composition doc</a></p>
  <p>If I declare the computed function in the  tag in the .vue file directly without importing it from another file, it works well as expected : the function returns the count value multiplied by 5.</p>
  <p>Obviously, that is something I don't understand clearly...but what ?</p>
  <p><em>I'm using 3.2 and the  tag, so the return from setup() in the script tag in no longer needed : <a href="https://blog.vuejs.org/posts/vue-3.2.html" rel="nofollow noreferrer">3.2</a></em></p>
  <p>Thank you in adavnce.</p>