Skip to content

The description of "Global Properties" was incorrect #1

Open
@WangZhenHao

Description

@WangZhenHao

https://skirtles-code.github.io/vue-examples/patterns/global-properties.html

This article say that
the lack of availability in setup is a major problem, so let's consider some other alternatives to globalProperties.

This statement has a mistake. we can use getCurrentInstance method to get the gobal properties.

`
import { ref, getCurrentInstance } from 'vue';

const { proxy } = getCurrentInstance();
`

vuejs/core#2233

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions