Skip to content

structuredClone api will produce an error if argument is reactive object #3223

Open
@mrleblanc101

Description

@mrleblanc101

I've recently stumbled upon this issue vuejs/core#8975.
I think the documentation should include tips on how to clone a ref/reactive.

Since ref and reactive allow to compose reactive objects, toRaw still may not work for them due to how it works: https://stackoverflow.com/a/72633173/16716350

Maybe the doc should recommend an official cloning library ?
useCloned from VueUse or klona ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions