Skip to content

add result to popToNative #111

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sjwall
Copy link
Contributor

@sjwall sjwall commented May 13, 2025

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 to popToNative.
On android result is accessible in the activity result.
On iOS result is accessible in the popToNative 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 a result value added
Running the example on iOS in the logs it will print the result
image
Running on Android it will show a popup
Screenshot 2025-05-13 at 07 41 21

Let me know what you think and if there's anything that can be done to improve it :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant