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

toRefs(<array>) should return an array of Ref #1764

Closed
ByScripts opened this issue Aug 3, 2020 · 0 comments · Fixed by #1768
Closed

toRefs(<array>) should return an array of Ref #1764

ByScripts opened this issue Aug 3, 2020 · 0 comments · Fixed by #1768
Labels
✨ feature request New feature or request

Comments

@ByScripts
Copy link

Version

3.0.0-rc.5

Reproduction link

https://codesandbox.io/s/frosty-resonance-i4nc0

Steps to reproduce

const model = ref(["a", "b", "c"]);
const refs = toRefs(model.value);

What is expected?

refs should be an array of refs:

[
  Ref<arr[0]>,
  Ref<arr[1]>,
  Ref<arr[2]>,
]

What is actually happening?

refs is an object:

{
  '0': Ref<arr[0]>,
  '1': Ref<arr[1]>,
  '2': Ref<arr[2]>,
}
@posva posva added the ✨ feature request New feature or request label Aug 3, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Nov 6, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
✨ feature request New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants