0PricingLogin
React Native Academy · Lesson

Connecting React Native Firebase to Your Project

Install @react-native-firebase/app, add the google-services.json and GoogleService-Info.plist files, and link the native modules for both iOS and Android.

React Native Firebase vs Expo Firebase

There are two approaches to using Firebase in React Native: the React Native Firebase library (@react-native-firebase) and the Firebase JS SDK used via firebase npm package. React Native Firebase uses native SDKs and is significantly more performant, but requires native build steps. The JS SDK works with Expo Go but has limitations on mobile.

This lesson covers React Native Firebase, which is the recommended approach for production apps. It requires a bare React Native or Expo bare workflow setup, meaning you must run expo prebuild or expo eject.

Creating a Firebase Project

Before writing any code, you need a Firebase project. Go to console.firebase.google.com, click Add project, and follow the setup wizard. Once the project is created, you add two app registrations: one for iOS (with your bundle ID) and one for Android (with your package name).

Firebase then provides configuration files: google-services.json for Android and GoogleService-Info.plist for iOS. These files contain API keys and project identifiers that the native Firebase SDKs use to authenticate with Firebase servers.

All lessons in this course

  1. Connecting React Native Firebase to Your Project
  2. Email and Phone Authentication with Firebase
  3. Reading and Writing Firestore Documents
  4. Real-Time Listeners and Offline Persistence
← Back to React Native Academy