Check out example codes for "back button ionic". It will help you in understanding the concepts better.

Code Example 1

<ion-header>
  <ion-toolbar>
    <ion-buttons slot="start">
      <ion-back-button></ion-back-button>
    </ion-buttons>
  </ion-toolbar>
</ion-header>

Learn ReactJs, React Native from akashmittal.com