Cloud Storage is a service that lets apps save and retrieve files like images, videos, or documents on the internet instead of the device. It helps keep data safe and accessible from anywhere.
Click to reveal answer
beginner
Name a popular cloud storage service used in React Native apps.
Firebase Storage is a popular choice. It integrates easily with React Native and lets you upload and download files securely.
Click to reveal answer
beginner
Why should you use cloud storage instead of device storage for user files?
Cloud storage keeps files safe if the device is lost or damaged, allows sharing across devices, and frees up device space.
Click to reveal answer
intermediate
What is a common step before uploading a file to cloud storage in React Native?
You usually get the file's local path or URI, then use the cloud storage SDK to upload it with proper permissions.
Click to reveal answer
intermediate
How do you ensure security when using cloud storage in mobile apps?
Use authentication to control who can upload or download files, and set rules in the cloud storage service to protect data.
Click to reveal answer
What is the main advantage of using cloud storage in mobile apps?
AFiles are deleted automatically after upload
BFiles are only saved on the device
CFiles cannot be shared between devices
DFiles are saved on the internet and accessible anywhere
✗ Incorrect
Cloud storage saves files online, so users can access them from any device connected to the internet.
Which service is commonly used for cloud storage in React Native apps?
AFirebase Storage
BLocal device storage
CSQLite database
DReact Native AsyncStorage
✗ Incorrect
Firebase Storage is designed for storing files in the cloud and works well with React Native.
Before uploading a file to cloud storage, you need to:
AConvert the file to text
BGet the file's local URI or path
CDelete the file from the device
DRestart the app
✗ Incorrect
You must know where the file is locally to upload it to the cloud.
How can you protect files stored in cloud storage?
AShare files publicly by default
BStore files without any restrictions
CUse authentication and storage rules
DDisable internet access
✗ Incorrect
Authentication and rules help control who can access or modify files.
What happens if you store files only on the device?
AFiles may be lost if the device is damaged
BFiles are automatically backed up online
CFiles can be accessed from any device
DFiles are encrypted by default
✗ Incorrect
Device-only storage risks losing files if the device breaks or is lost.
Explain how cloud storage benefits mobile apps compared to local device storage.
Think about what happens if your phone is lost or you want to use another device.
You got /4 concepts.
Describe the steps to upload a photo from a React Native app to cloud storage securely.
Consider what you need before uploading and how to keep files safe.
You got /4 concepts.
Practice
(1/5)
1.
What is the main purpose of Cloud Storage in a React Native app?
easy
A. To save and retrieve files online easily
B. To create user interfaces
C. To manage app navigation
D. To handle app state locally
Solution
Step 1: Understand Cloud Storage role
Cloud Storage is used to save and get files online, not for UI or navigation.
Step 2: Match purpose with options
Only To save and retrieve files online easily describes saving and retrieving files online.
Final Answer:
To save and retrieve files online easily -> Option A
Quick Check:
Cloud Storage = Save/Get files online [OK]
Hint: Cloud Storage is for files, not UI or navigation [OK]
Common Mistakes:
Confusing Cloud Storage with UI components
Thinking Cloud Storage manages app navigation
Assuming Cloud Storage handles local state
2.
Which of the following is the correct way to create a reference to a file named image.jpg in Cloud Storage?
const storage = getStorage();
const ref = ?
easy
A. getRef('image.jpg')
B. storage.ref('image.jpg')
C. ref(storage, 'image.jpg')
D. storage.getReference('image.jpg')
Solution
Step 1: Recall correct syntax for reference
In React Native Firebase, use ref(storage, 'filename') to create a reference.
Step 2: Check options for correct function
Only ref(storage, 'image.jpg') uses ref(storage, 'image.jpg') correctly.