Skip to content

Reduce the reliance on the global Vue in API Reference examples #861

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 16, 2021

Conversation

skirtles-code
Copy link
Contributor

This is the latest stage of #773, attempting to make the examples less specific to a particular build.

This PR attempts to remove the Vue. prefix from all of the examples in the API Reference. In most cases the examples are only using createApp, so the prefix is simply dropped. For examples that use other parts of the global API, where it may not be immediately clear to some readers that a particular function comes from the global API, I've switched the examples to use destructuring instead.

The Global API page itself now has an introduction explaining the two different ways to access the functions listed on that page.

There are some examples that explicitly use import to pull in parts of the global API. I haven't changed any of those here, though in a handful of cases that seems just as unnecessary as referencing the global Vue.

@NataliaTepluhina NataliaTepluhina merged commit 35f5b52 into vuejs:master Feb 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants