Ionic Vue 6.0 ionViewDidEnter Not working

neither ionViewWillEnter nor onIonViewWillEnter are triggered.
My ionic Vue version is 6.0

export default defineComponent({
name: ‘App’,
ionViewDidEnter () {
console.trace(“Did Enter”);
},

ionViewWillEnter () {
console.trace(“Will Enter”);
},

components: {
IonApp,
IonCol, IonGrid, IonRow,
IonSegment, IonSegmentButton,
IonContent,
// IonIcon,
// IonItem,
IonLabel,
// IonList,
// IonListHeader,
// IonMenu,
// IonMenuToggle,
// IonNote,
// IonRouterOutlet,
// IonSplitPane,
},
setup() {

// const selectedIndex = ref(0);
// const appPages = [
//   {
//     title: 'Inbox',
//     url: '/folder/Inbox',
//     iosIcon: mailOutline,
//     mdIcon: mailSharp
//   }
// ];
// const labels = ['Family', 'Friends', 'Notes', 'Work', 'Travel', 'Reminders'];

// const path = window.location.pathname.split('folder/')[1];
// if (path !== undefined) {
//   selectedIndex.value = appPages.findIndex(page => page.title.toLowerCase() === path.toLowerCase());
// }

const route = useRoute();

onIonViewWillEnter(() => {
  console.log('Entered tab!');
});

return { 
  // selectedIndex,
  // appPages, 
  // labels,
  archiveOutline, 
  archiveSharp, 
  bookmarkOutline, 
  bookmarkSharp, 
  heartOutline, 
  heartSharp, 
  mailOutline, 
  mailSharp, 
  paperPlaneOutline, 
  paperPlaneSharp, 
  trashOutline, 
  trashSharp, 
  warningOutline, 
  warningSharp,
  isSelected: (url: string) => url === route.path ? 'selected' : '', 
}

}
});

Did you import ionViewWillEnter and ionViewDidEnter from @ionic/vue?

VSCode adds the import for me automatically when I add it to my vue component.

Yes sir. I am also using VSCode, it automatically imported.

The Lifecycle events only fire if you are using the IonPage component.

Pages in your app need to be using the IonPage component in order for lifecycle methods and hooks to fire properly. - Source

Thanks for the info.

Unfortunately, it does not work as well. I already wrap ion-page under tag.

Can you provide the full component that you are having issues with with the template/html portion as well? Please use proper Markdown for code snippets too - link :slight_smile: