Skip to content

allow native and RN to share singleton instance #120

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

Merged
merged 1 commit into from
Mar 19, 2020

Conversation

littlehome-eugene
Copy link
Contributor

@littlehome-eugene littlehome-eugene commented Nov 17, 2019

Currently, if exception occurs when calling setSingletonInstance , we are rejecting it.

It prevents us using the singleton created at native side from RN.

If the exception is due to calling setSingletonInstance twice, we let the setup call resolve rather than reject so that RN can properly set itself up and use the singletonInstance created by native android.

This fixes #95

@bsneed bsneed merged commit cd9da63 into segmentio:master Mar 19, 2020
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.

Can't I use duplicated client from RN and native Segment?
2 participants