You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Maybe the doc should recommend an official cloning library ? useCloned from VueUse or klona ?
The text was updated successfully, but these errors were encountered:
mrleblanc101
changed the title
structuredClone api will produce an error if argument is reactive objectstructuredClone api will produce an error if argument is reactive object
Apr 16, 2025
Or maybe Vue should add a utility ?
Since Vue already ship multiple other utility https://vuejs.org/api/reactivity-utilities.html, maybe we could have something like toClone() or toCloned.
This new utility would handle ref/reactive that are composed with other ref/reactive
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
andreactive
allow to compose reactive objects, toRaw still may not work for them due to how it works: https://stackoverflow.com/a/72633173/16716350Maybe the doc should recommend an official cloning library ?
useCloned
fromVueUse
orklona
?The text was updated successfully, but these errors were encountered: