From c481d3a8e3c977e12cae676773ded5917db6e703 Mon Sep 17 00:00:00 2001 From: Eduardo San Martin Morote Date: Tue, 21 Jul 2020 11:46:52 +0200 Subject: [PATCH] docs: add comments --- src/RouterView.ts | 2 +- src/matcher/types.ts | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) 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 -- 2.47.3