Skip to content
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

Move asynchronous API calls to synchronous to match Firebase web JS SDK API #8118

Open
russellwheatley opened this issue Nov 7, 2024 · 1 comment
Labels
platform: all type: enhancement Implements a new Feature

Comments

@russellwheatley
Copy link
Member

We're moving RNFB API to match Firebase web JS SDK API, some API are currently asynchronous when they should be synchronous to match Firebase web JS SDK API.

For example, Auth: https://firebase.google.com/docs/reference/js/auth.auth

languageCode and tenantId are synchronous getters/setters.

This is an issue to track this work, and to help developers find an alternative solution to the deprecated JS debugger which has an issue with synchronous native calls.

@mikehardy - for visibility.

@mikehardy
Copy link
Collaborator

examples of how to make a native method synchronous, at least in old architecture ("Paper") react-native style (unsure if it is possible in Fabric / TurboModules)

Android:

iOS:

Both of those break the ability to use the old react-native javascript debugging interface as that pulls the bundle across the network to the debugger, executes it in the debugger context and sends the results back and forth to the native app, something that can't happen synchronously.

Historically the answer to this is "use reactotron" for debugging, but I believe react-native now has wholly moved to "React Native DevTools" as official recommendation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform: all type: enhancement Implements a new Feature
Projects
None yet
Development

No branches or pull requests

2 participants