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/ssr/routing.md
+6-6Lines changed: 6 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -25,14 +25,14 @@ And update our client and server entries:
25
25
26
26
```js
27
27
// entry-client.js
28
-
import { createApp } from'vue'
28
+
import { createSSRApp } from'vue'
29
29
import { createWebHistory } from'vue-router'
30
30
importcreateRouterfrom'./router.js'
31
31
importAppfrom'./App.vue'
32
32
33
33
// ...
34
34
35
-
constapp=createApp(App)
35
+
constapp=createSSRApp(App)
36
36
37
37
constrouter=createRouter(createWebHistory())
38
38
@@ -50,7 +50,7 @@ import createRouter from './router.js'
50
50
importAppfrom'./App.vue'
51
51
52
52
exportdefaultfunction () {
53
-
constapp=createSSRApp(Vue)
53
+
constapp=createSSRApp(App)
54
54
constrouter=createRouter(createMemoryHistory())
55
55
56
56
app.use(router)
@@ -79,16 +79,16 @@ const routes = [
79
79
]
80
80
```
81
81
82
-
On both client and server we need to wait for the router to resolve async route components ahead of time in order to properly invoke in-component hooks. For this we will be using [router.isReady](https://next.router.vuejs.org/api/#isready) method Let's update our client entry:
82
+
On both client and server we need to wait for the router to resolve async route components ahead of time in order to properly invoke in-component hooks. For this we will be using the [router.isReady](https://next.router.vuejs.org/api/#isready) method. Let's update our client entry:
0 commit comments