Search code examples
firebasereact-nativegoogle-cloud-firestorereact-native-firebase

What's the difference between Firebase JavaScript SDK and react-native-firebase


I am trying to use to use Firebase (Cloud Firestore) for a react-native app, to store my JSON objects.

I ve seen people using Firebase in their apps (npm install firebase), and others using react-native-firebase.

Most blogs say that Firebase itself is meant for web, so their react-native support is none/less. While a few other blogs and firebase official blog say that Firebase supports react-native.

I am not sure which library to choose, for my react-native project, and what's the difference between them.


Solution

  • According to project description on GitHub:

    React Native Firebase is a light-weight javascript layer connecting you to the native Firebase SDKs for both iOS and Android which aimes to mirror the offical Firebase Web SDK as closely as possible.

    Although the official Firebase JS SDK will work with React Native; it is mainly built for the web and has a limited feature-set compared to native.

    So, you should choose it, for react native platform. This will allow you to use more features and also benefit from using native sdk's (speed, memory consumption, etc.)