Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Section about deprecated onDemand and onAbort callback arguments #2330

Merged
merged 3 commits into from
Aug 6, 2024
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions packages/docs/guide/migration/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,11 @@ Given any [normalized route location](/api/#RouteLocationNormalized):

**Reason**: This allows to easily copy existing properties of a location when calling `router.push()` and `router.resolve()`, and make the resulting route location consistent across browsers. `router.push()` is now idempotent, meaning that calling `router.push(route.fullPath)`, `router.push({ hash: route.hash })`, `router.push({ query: route.query })`, and `router.push({ params: route.params })` will not create extra encoding.

### `$router.push()` and `$router.replace()` - `onComplete` and `onAbort` callbacks

Previously, `$router.push()` and `$router.replace()` accepted two callbacks, `onComplete` and `onAbort`, as second and third arguments. They were called after a navigation based on the result. With the introduction of a Promise based API, these callbacks are redundant and have been removed. See [Navigation Failures](/guide/advanced/navigation-failures.md) for more information on how to detect successful and failed navigations.
**Reason**: Reduce library size by adapting to established JS standards (Promises).
posva marked this conversation as resolved.
Show resolved Hide resolved

### TypeScript changes

To make typings more consistent and expressive, some types have been renamed:
Expand Down