title: ReactNative - How to call function in ViewController
body: <p>I'm new to ReactNative and I'm trying Integrate React Native to my current project.</p>
  
  <p>In my ViewController contain RCTRootView and the code implemented like:</p>
  
  <p><strong>ViewController.swift</strong></p>
  
  <pre><code>override func viewDidLoad() {
      super.viewDidLoad()        
      .....
          let bridge = RCTBridge(bundleURL: jsCodeLocation, moduleProvider: nil, launchOptions: nil)
  
          let reactRootView = RCTRootView(bridge: bridge, moduleName: "Index", initialProperties: props)
  
          self.view.addSubview(reactRootView);
          reactRootView.frame = self.view.bounds
          reactRootView.delegate = self;
      ....     
  }
  
  func onReactEvent(event :NSDictionary , callback: RCTResponseSenderBlock) {}
  </code></pre>
  
  <p><strong>ReactNativeManager.swift</strong></p>
  
  <pre><code>@objc func sendCustomEventToHost(event: NSDictionary, callback: RCTResponseSenderBlock) -&gt; Void {}
  </code></pre>
  
  <p>So how can I call <strong>onReactEvent()</strong> function in my <strong>ViewController</strong> from function <strong>sendCustomEventToHost()</strong> in <strong>ReactNativeManager</strong>.
  Thanks</p>