0
0
React Nativemobile~5 mins

Firebase setup (@react-native-firebase) in React Native - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
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?
Anpm install @react-native-firebase/app
Bnpm install firebase
Cnpm install react-native-firebase
Dnpm install firebase-core
Where do you place the google-services.json file in an Android React Native project?
Aandroid/src/
Bandroid/
Candroid/app/
Dandroid/app/src/main/
What tool manages iOS Firebase dependencies in React Native?
Anpm
BCocoaPods
CGradle
DYarn
What does npx pod-install do?
AInstalls iOS native dependencies via CocoaPods
BRuns the React Native app
CInstalls Android dependencies
DBuilds the JavaScript bundle
How do you check if Firebase initialized correctly in your React Native app?
ALook for <code>firebase.json</code> file
BRun <code>firebase init</code>
CCheck if <code>firebase.app().name</code> returns '[DEFAULT]'
DCheck AndroidManifest.xml
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.