You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/guide/migration/global-api.md
+9-1Lines changed: 9 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -65,6 +65,14 @@ import { createApp } from 'vue'
65
65
constapp=createApp({})
66
66
```
67
67
68
+
If you're using a [CDN](/guide/installation.html#cdn) build of Vue then `createApp` is exposed via the global `Vue` object:
69
+
70
+
```js
71
+
const { createApp } = Vue
72
+
73
+
constapp=createApp({})
74
+
```
75
+
68
76
An app instance exposes a subset of the current global APIs. The rule of thumb is _any APIs that globally mutate Vue's behavior are now moved to the app instance_. Here is a table of the current global APIs and their corresponding instance APIs:
69
77
70
78
| 2.x Global API | 3.x Instance API (`app`) |
@@ -198,7 +206,7 @@ export default {
198
206
}
199
207
```
200
208
201
-
Using `provide` is especially useful when writing a plugin, as an alternative to `globalProperties`.
209
+
Using `provide` is especially useful when writing a plugin, as an alternative to `globalProperties`.
0 commit comments