From 60a90159dfe4cafb21f54d0f8e9ed131d093d576 Mon Sep 17 00:00:00 2001 From: Eduardo San Martin Morote Date: Sat, 9 Jan 2021 11:03:42 +0100 Subject: [PATCH] docs: removal of router.app Close #700 --- docs/guide/migration/index.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/docs/guide/migration/index.md b/docs/guide/migration/index.md index 793a5f17..89650181 100644 --- a/docs/guide/migration/index.md +++ b/docs/guide/migration/index.md @@ -223,6 +223,19 @@ Otherwise there will be an initial transition as if you provided the `appear` pr Note that **if you have navigation guards upon the initial navigation**, you might not want to block the app render until they are resolved unless you are doing Server Side Rendering. In this scenario, not waiting the router to be ready to mount the app would yield the same result as in Vue 2. +### Removal of `router.app` + +`router.app` used to represent the last root component (Vue instance) that injected the router. Vue Router can now be safely used by multiple Vue applications at the same time. You can still add it when using the router: + +```js +app.use(router) +router.app = app +``` + +You can also extend the TypeScript definition of the `Router` interface to add the `app` property. + +**Reason**: Vue 3 applications do not exist in Vue 2 and now we property support multiple applications using the same Router instance, so having an `app` property would have been misleading because it would have been the application instead of the root instance. + ### Passing content to route components' `` Before you could directly pass a template to be rendered by a route components' `` by nesting it under a `` component: -- 2.47.3