Skip to content

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

Closed
@ByScripts

Description

@ByScripts

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]>,
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions