Check out example codes for "text field passing data". It will help you in understanding the concepts better.

Code Example 1

override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
        let secondController = segue.destination as! TwoViewController
        secondController.theLabel = textField.text!
    }
    
    @IBAction func buttonEnterTap(_ sender: Any) {
        if textField.text != "" {
            performSegue(withIdentifier: "segueOne", sender: self)
        }
    }

Learn ReactJs, React Native from akashmittal.com