fix(react): redirect routes should unmount leaving component, fixes #22022 (#22029)

This commit is contained in:
Ely Lucas
2020-09-04 14:56:20 -06:00
committed by GitHub
parent ec7c023873
commit b11e06cec1
5 changed files with 14 additions and 13 deletions

View File

@ -25,7 +25,7 @@ interface NavManagerProps {
locationHistory: LocationHistory;
}
export class NavManager extends React.Component<NavManagerProps, NavContextState> {
export class NavManager extends React.PureComponent<NavManagerProps, NavContextState> {
ionRouterContextValue: IonRouterContextState = {
push: (pathname: string, routerDirection?: RouterDirection, routeAction?: RouteAction, routerOptions?: RouterOptions, animationBuilder?: AnimationBuilder) => {