Reactivity: Document that class instances using native private fields are incompatible with ES6 proxies and therefore Vue's reactivity
Nobody has claimed this yet.
- Dominant language
- Vue
- Stars
- 3.2k
- Forks
- 5k
- Avg merge
- 14d 17h
- Merged PRs (30d)
- 1
Description
Issue triggered by this issue in core: https://github.com/vuejs/core/issues/7240
A class such as this one will throw an error when the getter is accessed on a reactive proxy for it:
class X {
#a = 'secret'
get getA() { return this.#a }
}
const x = reactive(new X())
x.getA // throws
Seee the example in the linked issue for a demo.
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 7240 and locate the existing reactivity documentation relevant to reactive class instances. Document that native private fields are incompatible with ES6 proxies and show the provided class example or its behavior; the documentation is done when this limitation and the resulting error are clear to users.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100