Skip to content

Commit

Permalink
fix(react): route with redirect will mount page
Browse files Browse the repository at this point in the history
  • Loading branch information
sean-perkins committed Jan 29, 2024
1 parent b1c4c72 commit 1e782a9
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/react/src/routing/PageManager.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,13 @@ export class PageManager extends React.PureComponent<PageManagerProps> {
this.ionPageElementRef.current.removeEventListener('ionViewWillEnter', this.ionViewWillEnterHandler);
this.ionPageElementRef.current.removeEventListener('ionViewDidEnter', this.ionViewDidEnterHandler);
this.ionPageElementRef.current.removeEventListener('ionViewWillLeave', this.ionViewWillLeaveHandler);
this.ionPageElementRef.current.removeEventListener('ionViewDidLeave', this.ionViewDidLeaveHandler);
/**
* We deliberately do not remove the `ionViewDidLeave` listener.
* The registered callback is used to unmount and remove the page.
* Removing the event listener prevents the callback from being called.
* The browser will automatically remove the event listener when the
* page element is removed from the DOM and garbage collected.
*/
}
}

Expand Down

0 comments on commit 1e782a9

Please sign in to comment.