Ionic React Lifecycle Methods and Hooks explained in 5 minutes

Publié le: 16 septembre 2021
sur la chaîne: Alan Montgomery
3,431
81

The Lifecycle methods in Ionic allow you to execute bits of code at a certain point of time relative to a components or page's lifecycle. This allows you to fetch data before the page has rendered or clean up subscriptions once it leaves.

Ionic React manages the page lifecycle itself and has its own methods and hooks to ensure we're not limited or restricted to using the useEffect, componentDidMount, or componentDidUnmont.

The hooks are;
useIonViewWillEnter
useIonViewDidEnter
useIonViewWillLeave
useIonViewDidLeave

#############################
🔗 Ionic Page Lifecycle Docs
https://ionicframework.com/docs/react...

🔗 Ionic Page Lifecycle Hooks
https://ionicframework.com/docs/react...

🎉 Reach out to me
  / 93alan  

💙 UI Examples with Code and Live Demos
https://ionicreacthub.com
#############################

00:00 Introduction
00:35 React Lifecycle phases
00:48 Ionic React Lifecycle
01:27 ionViewWillEnter (useIonViewWillEnter)
01:52 ionViewDidEnter (useIonViewDidEnter)
02:26 ionViewWillLeave (useIonViewWillLeave)
02:50 ionViewDidLeave (useIonViewDidLeave)
03:25 Diagram to show how they fire
04:22 Ionic App example
05:22 Outro

#ionic #capacitor #webnative #react #reactjs #ionicreact


Sur cette page du site, vous pouvez voir la vidéo en ligne Ionic React Lifecycle Methods and Hooks explained in 5 minutes durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur Alan Montgomery 16 septembre 2021, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 3,431 fois et il a aimé 81 téléspectateurs. Bon visionnage!