Compatible with existing Firebase JS SDK? #6969
-
"The @react-native-firebase/app module must be installed before using any other Firebase service." Does this mean that I cannot use @react-native-firebase if I am already using the Firebase JS SDK in my React Native app? I have seen conflicting information about whether it is compatible with existing logic. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
In general you will not want to mix the two libraries, as react-native-firebase bundles firebase-android-sdk and firebase-ios-sdk (the native SDKs) for you. Pulling in the JS SDK at the same time is probably redundant and it would be better to use the native SDKs via react-native-firebase APIs That said, sure, you can use the JS SDK for some things and react-native-firebase for others. They have different import namespaces so javascript will let you. You'll still need to install + configure + use react-native-firebase correctly (for whatever parts of it you choose to use...) according to the documentation, including the core "app" module. |
Beta Was this translation helpful? Give feedback.
In general you will not want to mix the two libraries, as react-native-firebase bundles firebase-android-sdk and firebase-ios-sdk (the native SDKs) for you. Pulling in the JS SDK at the same time is probably redundant and it would be better to use the native SDKs via react-native-firebase APIs
That said, sure, you can use the JS SDK for some things and react-native-firebase for others. They have different import namespaces so javascript will let you.
You'll still need to install + configure + use react-native-firebase correctly (for whatever parts of it you choose to use...) according to the documentation, including the core "app" module.