Skip to content

Commit

Permalink
add adoption strategy
Browse files Browse the repository at this point in the history
  • Loading branch information
posva committed Apr 22, 2020
1 parent a6251e2 commit d98b674
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion active-rfcs/0000-router-navigation-failures.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,9 +165,10 @@ router.afterEach((to, from, failure) => {

# Alternatives

- Differentiating `next(false)` from navigations that get overriden by more recent navigations by defining another Navigation Failure
- Differentiating `next(false)` from navigations that get overridden by more recent navigations by defining another Navigation Failure

# Adoption strategy

- Expose `NavigationFailureType` in vue-router@3 so that Navigation Failures can be told apart from regular Errors. We could also expose a function `isNavigationFailure` to tell them apart.
- `afterEach` and `onError` are relatively simple to migrate, most of the time they are not used many times either.
- `router.push` doesn't reject when navigation fails anymore. Any code relying on catching an error should await the promise result instead.

0 comments on commit d98b674

Please sign in to comment.