Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ref(true) in Object / can not access direct values #493

Closed
uiuifree opened this issue Aug 28, 2020 · 1 comment
Closed

Ref(true) in Object / can not access direct values #493

uiuifree opened this issue Aug 28, 2020 · 1 comment

Comments

@uiuifree
Copy link

version : 1.0.0-beta.11

This pattern a bug or correct?

example

<template>
<div>
count : {{count}}
test.count : {{test.count}}
</div>
</template>
<script lang="ts">
import { defineComponent, ref } from '@vue/composition-api'
  setup () {
    const count = ref(0)
    return {
      count,
      test: {
        count
      }
    }
  }
})
</script>

result render

count : 0
test.count : {"value":0}

I was expecting both to return 0.

@pikax
Copy link
Member

pikax commented Aug 28, 2020

That's working as intended, please check vuejs/core#1682

@pikax pikax closed this as completed Aug 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants