What is the purpose of the App.js file in a React Native project?
The App.js file is the main entry point of a React Native app. It defines the root component that renders the app's UI and manages navigation or state at the top level.
Click to reveal answer
beginner
What kind of files are usually found in the assets folder?
The assets folder stores static files like images, fonts, and icons that the app uses to display visuals and style.
Click to reveal answer
beginner
Why do React Native projects have a node_modules folder?
The node_modules folder contains all the external libraries and packages installed via npm or yarn that the app depends on.
Click to reveal answer
beginner
What is the role of the package.json file?
The package.json file lists the project’s dependencies, scripts, and metadata like the app name and version. It helps manage the project setup.
Click to reveal answer
beginner
Where do you usually put reusable UI components in a React Native project?
Reusable UI components are typically placed in a components folder to keep the project organized and make components easy to find and reuse.
Click to reveal answer
Which file is the main entry point of a React Native app?
Aindex.html
BApp.js
Cmain.css
Dconfig.json
✗ Incorrect
App.js is the root component file where the app starts running.
Where should you put images used in your React Native app?
Anode_modules folder
Bsrc folder
Ccomponents folder
Dassets folder
✗ Incorrect
The assets folder is for static files like images and fonts.
What does the node_modules folder contain?
AExternal libraries and packages
BApp source code
CImage files
DConfiguration files
✗ Incorrect
node_modules stores all installed packages your app uses.
Which file lists your app’s dependencies and scripts?
Apackage.json
BApp.js
CREADME.md
Dindex.js
✗ Incorrect
package.json manages dependencies and scripts for the project.
Where do you keep reusable UI components in a React Native project?
Anode_modules folder
Bassets folder
Ccomponents folder
Dconfig folder
✗ Incorrect
The components folder organizes reusable UI parts.
Describe the main folders and files you find in a React Native project and their purposes.
Think about where code, images, reusable parts, and dependencies are stored.
You got /5 concepts.
Explain why organizing your React Native project structure is important for app development.
Consider how a tidy project helps you and others work better.
You got /5 concepts.
Practice
(1/5)
1. In a typical React Native project, where should you place your main app code for better organization?
easy
A. Inside the android folder
B. Directly in the root folder
C. Inside a folder named src
D. Inside the ios folder
Solution
Step 1: Understand folder roles
The android and ios folders contain platform-specific native code, not app logic.
Step 2: Identify app code location
App code is best organized inside a src folder to keep it separate and clear.
Final Answer:
Inside a folder named src -> Option C
Quick Check:
App code = src folder [OK]
Hint: App code goes in src folder, not platform folders [OK]
Common Mistakes:
Putting app code inside android or ios folders
Keeping all code in the root folder without organization
2. Which of the following is the correct folder name for platform-specific Android code in a React Native project?
easy
A. android
B. android_src
C. AndroidCode
D. androidApp
Solution
Step 1: Recall standard folder names
React Native uses android as the folder name for Android platform code by default.
Step 2: Compare options
Only android matches the exact folder name used by React Native.
Final Answer:
android -> Option A
Quick Check:
Android folder = android [OK]
Hint: Platform folders are named exactly android and ios [OK]
Common Mistakes:
Using camelCase or underscores in platform folder names