0

In our React Native app, I've called a iOS native view controller. And It has been done with the solution given in following link : React-Native iOS - How can I navigate to a non-React-Native view (native iOS view controller) from a React-Native view with a button press?

As mentioned in solution, control is coming back to react native with the following code :

 // Dismiss the VC so control go back from iOS to react-native
 [self dismissViewControllerAnimated:TRUE completion:nil];

My question is, how can I pass parameters (some response values) back to react native view? and how can intercept it back on same react native view code. Looking at the documentation, I found some way to use callback parameters, but I ain't understand much on how to use it in my code.

jnpdx
  • 45,847
  • 6
  • 64
  • 94
  • have you tried with ```RCTEventEmitter``` ? my suggestion: send an event when navigate back, and in React Native code, regist an EventListener, then it can listen everything you passed back from native code – Quang Thái Feb 02 '21 at 04:34
  • thanks. that helpful, it seem its a plausible solution. Though I'll figure out the code by myself, Still if it possible to give me a link of related code or sample code, it would be very great. – Ashish Balhara Feb 02 '21 at 06:29

0 Answers0