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-vue-router.md
+39Lines changed: 39 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -8,6 +8,45 @@ order: 26
8
8
9
9
<pclass="tip">The list of deprecations below should be relatively complete, but the migration helper is still being updated to catch them.</p>
10
10
11
+
## Router Initialization
12
+
13
+
### `router.start` <sup>deprecated</sup>
14
+
15
+
There is no longer a special API to initialize an app with Vue Router. That means instead of:
16
+
17
+
```js
18
+
router.start({
19
+
template:'<router-view></router-view>'
20
+
}, '#app')
21
+
```
22
+
23
+
You'll just pass a router property to a Vue instance:
24
+
25
+
```js
26
+
newVue({
27
+
el:'#app',
28
+
router: router,
29
+
template:'<router-view></router-view>'
30
+
})
31
+
```
32
+
33
+
Or, if you're using the runtime-only build of Vue:
34
+
35
+
```js
36
+
newVue({
37
+
el:'#app',
38
+
router: router,
39
+
render:h=>h('router-view')
40
+
})
41
+
```
42
+
43
+
{% raw %}
44
+
<divclass="upgrade-path">
45
+
<h4>Upgrade Path</h4>
46
+
<p>Run the <ahref="https://github.com/vuejs/vue-migration-helper">migration helper</a> on your codebase to find examples of <code>router.start</code> being called.</p>
0 commit comments