0
0
React Nativemobile~10 mins

Firebase setup (@react-native-firebase) in React Native - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to import the Firebase app module from @react-native-firebase.

React Native
import [1] from '@react-native-firebase/app';
Drag options to blanks, or click blank then click option'
AfirebaseApp
Bfirebase
Cfirebase_app
DfirebaseAppModule
Attempts:
3 left
💡 Hint
Common Mistakes
Using camelCase or underscores in the import name.
Trying to import from a wrong package.
2fill in blank
medium

Complete the code to initialize the Firebase app in React Native.

React Native
const app = [1]();
Drag options to blanks, or click blank then click option'
AinitializeFirebase
Bfirebase
Cfirebase.initializeApp
Dfirebase.app
Attempts:
3 left
💡 Hint
Common Mistakes
Trying to call 'initializeApp' directly without firebase.
Using incorrect method names.
3fill in blank
hard

Fix the error in importing the Firestore module from @react-native-firebase.

React Native
import firestore from '[1]';
Drag options to blanks, or click blank then click option'
A@react-native-firebase/firestore
B@firebase/firestore
Creact-native-firebase/firestore
Dfirebase/firestore
Attempts:
3 left
💡 Hint
Common Mistakes
Using web Firebase package names.
Omitting the '@' symbol.
4fill in blank
hard

Fill both blanks to correctly get a Firestore collection reference.

React Native
const usersCollection = firestore().[1]('[2]');
Drag options to blanks, or click blank then click option'
Acollection
Bdoc
Cusers
Ddatabase
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'doc' instead of 'collection' for collection reference.
Using wrong collection names.
5fill in blank
hard

Fill all three blanks to add a document with data to Firestore.

React Native
firestore().[1]('[2]').[3]({ name: 'John', age: 30 });
Drag options to blanks, or click blank then click option'
Acollection
Busers
Cadd
Dset
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'set' without a document reference.
Mixing up collection and document methods.