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.

2
  • 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 Commented Feb 2, 2021 at 4: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. Commented Feb 2, 2021 at 6:29

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.