Stale crumbs #580
-
Hi graham, I've been having a bit of a hard time getting the router to do what I need. My situation is as follows: I have an app that will need to open a camera view in various different sections of the app, which will then take a photo and needs to pass the image data elsewhere and also either navigate back to the screen before or on to another one. This could be handled easily using the camera view in a modal, unfortunately the camera library I am using does not work in a modal on Android . So I have to have the camera view in its own scene, (which will be better for battery life anyway so not the end of the world), however, this then opens a can of worms relating to communication between the scenes. I don't want to use a global state manager, I've thought about how that could be done in an elegant way but every approach seems hacky and unintuitive. I'd love to be able to pass a callback function as a param as requested here, much like react-native-navigation does, but I can see that you're not keen on implementing that. The cleanest solution I've come up with is something along the lines of (pseudo code): State A (a component that uses the camera view) has the following code:
So I pass the Am I missing something? By the way, thanks for your quick reply on the nav bar issue I was having, I haven't got around to sorting that yet but will report back once I get back onto it, thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
Hi Alex. Why can't you call |
Beta Was this translation helpful? Give feedback.
Hi Alex. Why can't you call
stateNavigator.navigateBack(1)
from theCapture
component?