UNPKG

1.55 kBMarkdownView Raw
1# vue-router-next [![CircleCI](https://circleci.com/gh/vuejs/vue-router-next.svg?style=svg)](https://circleci.com/gh/vuejs/vue-router-next)
2
3## Status: Alpha
4
5The current codebase has most of the existing features on Vue Router v3.x and is usable. It supports all the [merged RFCs](https://github.com/vuejs/rfcs/pulls?q=is%3Apr+is%3Amerged+label%3Arouter).
6
7Since the library is still unstable **and because we want feedback** on bugs and missing features, **it will probably go through a few breaking changes**.
8
9## Known issues
10
11### Breaking changes compared to vue-router@3.x
12
13- `mode: 'history'` -> `history: createWebHistory()`
14- Catch all routes (`/*`) must now be defined using a parameter with a custom regex: `/:catchAll(.*)`
15- `router.match` and `router.resolve` are merged together into `router.resolve` with a slightly different signature
16- `router.getMatchedComponents` is now removed as they can be retrieved from `router.currentRoute.value.matched`:
17 ```js
18 router.currentRoute.value.matched
19 .map(record => Object.values(record.components))
20 .flat()
21 ```
22
23#### Improvements
24
25These are technically breaking changes but they fix an inconsistent behavior.
26
27- Pushing or resolving a non existent named route throws an error instead of navigating to `/` and displaying nothing.
28
29### Missing features
30
31- `keep-alive` is not yet supported
32- Partial support of per-component navigation guards. No `beforeRouteEnter`
33
34## Contributing
35
36See [Contributing Guide](https://github.com/vuejs/vue-router-next/blob/master/.github/contributing.md).
37
\No newline at end of file