Skip to content

Commit a698f97

Browse files
committed
docs: reduce the reliance on the global Vue in API Reference examples
vuejs/docs@35f5b52
1 parent 50519c2 commit a698f97

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/api/options-dom.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,12 @@
3939
```
4040

4141
```js
42-
const app = Vue.createApp({})
42+
const { createApp, h } = Vue
43+
const app = createApp({})
4344

4445
app.component('my-title', {
4546
render() {
46-
return Vue.h(
47+
return h(
4748
'h1', // tag name,
4849
this.blogTitle // tag content
4950
)

0 commit comments

Comments
 (0)