Reduce the reliance on the global Vue in API Reference examples #861
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 usingcreateApp
, 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 globalVue
.