From fe9111e2acebcb06f057c08588c5ca7d9ff6fb90 Mon Sep 17 00:00:00 2001 From: Eduardo San Martin Morote Date: Mon, 21 Sep 2020 09:29:52 +0200 Subject: [PATCH] docs: add note about routes being required --- docs/guide/migration/index.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/guide/migration/index.md b/docs/guide/migration/index.md index 393ffd24..ed315724 100644 --- a/docs/guide/migration/index.md +++ b/docs/guide/migration/index.md @@ -342,6 +342,16 @@ history.replaceState(history.state, '', url) **Reason**: We use the history state to save information about the navigation like the scroll position, previous location, etc. +### `routes` option is required in `options` + +The property `routes` is now required in `options`. + +```js +createRouter({ routes: [] }) +``` + +**Reason**: The router is designed to be created with routes even though you can add them later on. You need at least one route in most scenarios and this is written once per app in general. + ### Navigation guards in mixins are ignored At the moment navigation guards in mixins are not supported. You can track its support at [vue-router#454](https://github.com/vuejs/vue-router-next/issues/454). -- 2.47.3