Check out example codes for "Expression of type 'UIViewController?' is unused warning when pop view controller in swift 3.0". It will help you in understanding the concepts better.

Code Example 1

@IBAction func goBackToIntroView(_ sender: UIButton) {
        self.navigationController?.popViewController(animated: true)
//  popViewController(animated:) returnsUIViewController?
// , and the compiler is giving that warning since you aren't capturing the value. The solution is to assign it to an underscore:
// Answer

_ = navigationController?.popViewController(animated: true)

Learn ReactJs, React Native from