Skip to content

Commit 2396cba

Browse files
committed
docs: better routeBeforeUpdate
Close #2951
1 parent 75a18dc commit 2396cba

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Diff for: docs/guide/advanced/navigation-guards.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -106,11 +106,11 @@ const Foo = {
106106
// because it has not been created yet when this guard is called!
107107
},
108108
beforeRouteUpdate (to, from, next) {
109-
// called when the route that renders this component has changed,
110-
// but this component is reused in the new route.
109+
// called when the route that renders this component has changed.
110+
// This component being reused (by using an explicit `key`) in the new route or not doesn't change anything.
111111
// For example, for a route with dynamic params `/foo/:id`, when we
112112
// navigate between `/foo/1` and `/foo/2`, the same `Foo` component instance
113-
// will be reused, and this hook will be called when that happens.
113+
// will be reused (unless you provided a `key` to `<router-view>`), and this hook will be called when that happens.
114114
// has access to `this` component instance.
115115
},
116116
beforeRouteLeave (to, from, next) {

0 commit comments

Comments
 (0)