Skip to main content
Version: Next

VisitListener()

Home > @backstage/plugin-home > VisitListener

Component responsible for listening to location changes and calling the visitsApi to save visits.

Signature:

VisitListener: ({ children, toEntityRef, visitName, }: {
children?: React.ReactNode;
toEntityRef?: (({ pathname }: {
pathname: string;
}) => string | undefined) | undefined;
visitName?: (({ pathname }: {
pathname: string;
}) => string) | undefined;
}) => JSX.Element

Parameters

Parameter

Type

Description

{ children, toEntityRef, visitName, }

{ children?: React.ReactNode; toEntityRef?: (({ pathname }: { pathname: string; }) => string | undefined) | undefined; visitName?: (({ pathname }: { pathname: string; }) => string) | undefined; }

**Returns:**

JSX.Element