Challenge - 5 Problems
Project Structure Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate2:00remaining
Understanding the purpose of the 'src' folder
In a React Native project, what is the main purpose of the 'src' folder?
Attempts:
2 left
💡 Hint
Think about where you write your app's main code.
✗ Incorrect
The 'src' folder is used to organize all source code files such as components, screens, and helper utilities. Configuration files and assets are usually stored elsewhere.
❓ ui_behavior
intermediate2:00remaining
Effect of placing components outside 'src' folder
What happens if you place React Native components outside the 'src' folder in a typical project?
Attempts:
2 left
💡 Hint
Think about code organization and build process.
✗ Incorrect
React Native does not require components to be inside 'src', but placing them outside can make the project messy and harder to maintain.
❓ lifecycle
advanced2:00remaining
Role of 'App.js' in project structure
In a React Native project, what is the role of the 'App.js' file in the project structure?
Attempts:
2 left
💡 Hint
Think about what starts the app when it launches.
✗ Incorrect
'App.js' is the main file that defines the root React component and is registered to start the app.
advanced
2:00remaining
Where to place navigation files in project structure
Where is the best place to put navigation-related files in a React Native project?
Attempts:
2 left
💡 Hint
Think about keeping related files organized.
✗ Incorrect
Navigation files are best kept in their own folder inside 'src' to keep the project organized and maintainable.
🔧 Debug
expert2:00remaining
Identifying cause of 'module not found' error
You moved a component file from 'src/components' to 'components' at the root level but now get a 'module not found' error when importing it. What is the most likely cause?
Attempts:
2 left
💡 Hint
Check import statements after moving files.
✗ Incorrect
When moving files, import paths must be updated to the new location. Otherwise, the bundler cannot find the module.