`structuredClone` api will produce an error if argument is reactive object
Nobody has claimed this yet.
- Dominant language
- Vue
- Stars
- 3.2k
- Forks
- 5k
- Avg merge
- 14d 17h
- Merged PRs (30d)
- 1
Description
I've recently stumbled upon this issue https://github.com/vuejs/core/issues/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 ?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the linked Vue core issue 8975 and the existing documentation for ref, reactive, and toRaw. Clarify whether the docs should explain cloning reactive objects or recommend a library such as VueUse's useCloned or klona; done means the guidance and recommendation are explicit.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100