Check out example codes for "change navigation bar of master detail page xamarin form". It will help you in understanding the concepts better.

Code Example 1

async void OnRootPageButtonClicked (object sender, EventArgs e)
{
  await Navigation.PopToRootAsync ();
}

Learn ReactJs, React Native from akashmittal.com