From: Eduardo San Martin Morote Date: Tue, 21 Jul 2020 09:46:52 +0000 (+0200) Subject: docs: add comments X-Git-Tag: v4.0.0-beta.3~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c481d3a8e3c977e12cae676773ded5917db6e703;p=thirdparty%2Fvuejs%2Frouter.git docs: add comments --- diff --git a/src/RouterView.ts b/src/RouterView.ts index f0ec73e4..f51fc953 100644 --- a/src/RouterView.ts +++ b/src/RouterView.ts @@ -70,7 +70,7 @@ export const RouterViewImpl = defineComponent({ : routePropsOption : null - // we nee the value at the time we render because when we unmount, we + // we need the value at the time we render because when we unmount, we // navigated to a different location so the value is different const currentName = props.name const onVnodeMounted = () => { diff --git a/src/matcher/types.ts b/src/matcher/types.ts index cbf0c39e..ffef55f4 100644 --- a/src/matcher/types.ts +++ b/src/matcher/types.ts @@ -23,6 +23,12 @@ export interface RouteRecordNormalized { leaveGuards: NavigationGuard[] updateGuards: NavigationGuard[] enterCallbacks: NavigationGuardNextCallback[] + // having the instances on the record mean beforeRouteUpdate and + // beforeRouteLeave guards can only be invoked with the latest mounted app + // instance if there are multiple application instances rendering the same + // view, basically duplicating the content on the page, which shouldn't happen + // in practice. It will work if multiple apps are rendering different named + // views. instances: Record // can only be of of the same type as this record aliasOf: RouteRecordNormalized | undefined