Check out example codes for "swift hide navigation bar". It will help you in understanding the concepts better.

Code Example 1

override func viewWillAppear(_ animated: Bool) {
    super.viewWillAppear(animated)
    navigationController?.setNavigationBarHidden(true, animated: animated)
}

override func viewWillDisappear(_ animated: Bool) {
    super.viewWillDisappear(animated)
    navigationController?.setNavigationBarHidden(false, animated: animated)
}

Learn ReactJs, React Native from akashmittal.com