'Vue 3: Is getCurrentInstance() deprecated?
I've seen references to getCurrentInstance() function on some old(?) documents and codes, but cannot find it in the current Vue 3 document.
Is getCurrentInstance() deprecated?
If so, what is the reason? (inject() considered enough?) If not, why can't I find it in the document?
Solution 1:[1]
I think the docs for getCurrentInstance() were accidentally removed...
getCurrentInstance() was originally documented in 4-Oct-2020, but that was later removed in 31-Aug-2021 in a major refactoring of the Composition API docs by the creator of Vue (Evan You). It's unclear whether the removal of those docs was intentional because getCurrentInstance() still:
I would consider it an undocumented API for the moment. However, it's possible that Evan intended for it to be an internal API only.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 |
