Skip to content

Commit

Permalink
docs: better routeBeforeUpdate
Browse files Browse the repository at this point in the history
Close #2951
  • Loading branch information
posva committed Aug 8, 2020
1 parent 75a18dc commit 2396cba
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/guide/advanced/navigation-guards.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,11 @@ const Foo = {
// because it has not been created yet when this guard is called!
},
beforeRouteUpdate (to, from, next) {
// called when the route that renders this component has changed,
// but this component is reused in the new route.
// called when the route that renders this component has changed.
// This component being reused (by using an explicit `key`) in the new route or not doesn't change anything.
// For example, for a route with dynamic params `/foo/:id`, when we
// navigate between `/foo/1` and `/foo/2`, the same `Foo` component instance
// will be reused, and this hook will be called when that happens.
// will be reused (unless you provided a `key` to `<router-view>`), and this hook will be called when that happens.
// has access to `this` component instance.
},
beforeRouteLeave (to, from, next) {
Expand Down

0 comments on commit 2396cba

Please sign in to comment.