Skip to content

Commit 5ddaf35

Browse files
fix: use createSSRApp instead of createApp (#1311)
1 parent f4311ed commit 5ddaf35

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/guide/ssr/routing.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,14 @@ And update our client and server entries:
2525

2626
```js
2727
// entry-client.js
28-
import { createApp } from 'vue'
28+
import { createSSRApp } from 'vue'
2929
import { createWebHistory } from 'vue-router'
3030
import createRouter from './router.js'
3131
import App from './App.vue'
3232

3333
// ...
3434

35-
const app = createApp(App)
35+
const app = createSSRApp(App)
3636

3737
const router = createRouter(createWebHistory())
3838

@@ -50,7 +50,7 @@ import createRouter from './router.js'
5050
import App from './App.vue'
5151

5252
export default function () {
53-
const app = createSSRApp(Vue)
53+
const app = createSSRApp(App)
5454
const router = createRouter(createMemoryHistory())
5555

5656
app.use(router)
@@ -79,16 +79,16 @@ const routes = [
7979
]
8080
```
8181

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:
8383

8484
```js
8585
// entry-client.js
86-
import { createApp } from 'vue'
86+
import { createSSRApp } from 'vue'
8787
import { createWebHistory } from 'vue-router'
8888
import createRouter from './router.js'
8989
import App from './App.vue'
9090

91-
const app = createApp(App)
91+
const app = createSSRApp(App)
9292

9393
const router = createRouter(createWebHistory())
9494

0 commit comments

Comments
 (0)