Use destructuring to access createApp, etc. in render-function.md #803
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 part of #773. The objective is to make more of the examples agnostic to whether they're using a CDN or ESM build.
render-function.md
is one of the pages where theVue.
prefix is most conspicuous so I've started there.The first example still includes the global
Vue
but it is destructured on the first line to resemble animport
. Most of the other examples are code fragments so that line is omitted. I have included it whenever a new global function is introduced, to make it clear where it comes from.Many of the examples just show an isolated
render
function, which makes it tricky to also show the destructuring. I wasn't sure how best to show that, so I included a commented ellipsis. It's a little clunky but it was the best idea I had.I haven't explicitly acknowledged the difference between the builds on this page. That might be added later but I'm unclear precisely how I'm going to approach that on other pages yet.