# React lifecycle hook

**URL:** <https://forum.ionicframework.com/t/react-lifecycle-hook/197760>\
**Category:** Ionic React\
**Created:** [October 12, 2020, 2:31pm UTC](https://forum.ionicframework.com/t/react-lifecycle-hook/197760 "2020-10-12T14:31:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vinodhumm](https://avatars.discourse-cdn.com/v4/letter/v/ea5d25/32.png) [@Vinodhumm](https://forum.ionicframework.com/u/Vinodhumm)\
**Post date:** [October 12, 2020, 2:31pm UTC](https://forum.ionicframework.com/t/react-lifecycle-hook/197760/1 "2020-10-12T14:31:25Z")

</div>

hi,  
I am trying react lifecycle hooks, and useIonViewDidEnter and useIonViewWillEnter are triggering even I route to different page. but I dont want to them to fiire other pages, is there a different lifecycle hook for for page level ?

```auto
 useIonViewDidEnter,
  useIonViewDidLeave,
  useIonViewWillEnter,
  useIonViewWillLeave

```

---

<div class="post-metadata">

**Author:** ![max](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/max/32/137761_2.png) [@max](https://forum.ionicframework.com/u/max)\
**Post date:** [October 20, 2020, 9:53pm UTC](https://forum.ionicframework.com/t/react-lifecycle-hook/197760/2 "2020-10-20T21:53:40Z")

</div>

Do you have an example of how you’re using them?
