add result to popToNative #111
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hey, thank you for the great work on this library, it has been super useful
Summary
Allows data to be passed back to native within the lifecycle.
A use case example is if the user was asked a question in react native, returning the result to action that in native.
Adds a
result
param topopToNative
.On android
result
is accessible in the activity result.On iOS
result
is accessible in thepopToNative
notification broadcast.An alternative approach would be to build this out in a separate library or have a shared storage solution
Test plan
In the example app the


popToNative
call has aresult
value addedRunning the example on iOS in the logs it will print the result
Running on Android it will show a popup
Let me know what you think and if there's anything that can be done to improve it :)