Recall & Review
beginner
What is the first step to add Firebase to a React Native app using @react-native-firebase?
The first step is to install the core Firebase package with npm or yarn, for example:
npm install @react-native-firebase/app.Click to reveal answer
beginner
Why do you need to add
google-services.json or GoogleService-Info.plist files in Firebase setup?These files contain your Firebase project configuration and credentials. They connect your app to your Firebase project on Android (
google-services.json) and iOS (GoogleService-Info.plist).Click to reveal answer
intermediate
How do you link native Firebase SDKs after installing @react-native-firebase packages?
For React Native 0.60+, auto-linking handles this. For older versions, you must manually link native modules using
react-native link.Click to reveal answer
intermediate
What is the purpose of running
npx pod-install in iOS Firebase setup?It installs the native iOS Firebase dependencies using CocoaPods, ensuring the Firebase SDK is correctly integrated into the Xcode project.
Click to reveal answer
beginner
How can you verify Firebase is correctly set up in your React Native app?
You can import Firebase in your app and check if the app instance initializes without errors, for example: <code>import firebase from '@react-native-firebase/app'; console.log(firebase.app().name);</code> should print <code>[DEFAULT]</code>.Click to reveal answer
Which command installs the core Firebase package for React Native?
✗ Incorrect
The official package for Firebase in React Native is @react-native-firebase/app.
Where do you place the
google-services.json file in an Android React Native project?✗ Incorrect
The
google-services.json file goes inside the android/app/src/main/ folder.What tool manages iOS Firebase dependencies in React Native?
✗ Incorrect
CocoaPods manages native iOS dependencies, including Firebase SDKs.
What does
npx pod-install do?✗ Incorrect
npx pod-install installs iOS native dependencies using CocoaPods.How do you check if Firebase initialized correctly in your React Native app?
✗ Incorrect
Calling
firebase.app().name returns '[DEFAULT]' if Firebase initialized properly.Explain the steps to set up Firebase in a React Native app using @react-native-firebase.
Think about installation, configuration files, native setup, and verification.
You got /5 concepts.
Why is it important to add platform-specific Firebase config files in your React Native project?
Consider how Firebase knows which project your app belongs to.
You got /5 concepts.