Module quiz: Pressable, Images and Hooks in React Native :React Native (Meta React Native Specialization) Answers 2025
1. Question 1
Which hooks belong to core React Native?
-
✔️ useColorScheme
-
✔️ useWindowDimensions
-
❌ useAppState (this is from @react-native-community/hooks, not core)
2. Question 2
Component for background image:
-
✔️ ImageBackground
-
❌ View
-
❌ Image
3. Question 3
Pressable can accept children that become the clickable area.
-
✔️ True
-
❌ False
4. Question 4
Values accepted by Image resizeMode:
-
✔️ cover
-
✔️ contain
-
❌ left (invalid)
-
✔️ stretch
5. Question 5
True statements about Image component:
-
❌ The Image component cannot fetch from network
-
✔️ The Image component can fetch/display local images
-
✔️ The Image component can fetch/display network images
6. Question 6
Correct code snippet showing “Little Lemon logo” with resizeMode "contain".
➡️ The correct snippet is the one where Image has:resizeMode="contain"
✔️ Choose the snippet that includes:
<Image
style={styles.logo}
source={logo}
resizeMode="contain"
/>
(The one with resizeMode=”contain” is correct.)
7. Question 7
Hook for app state active/inactive/background:
-
✔️ useAppState
-
❌ useKeyboard
-
❌ useDeviceOrientation
8. Question 8
useState is used for changing state or user interactions.
-
✔️ True
-
❌ False
9. Question 9
What is true about ImageBackground?
-
✔️ It has the same props as the Image component.
-
❌ It has different props
10. Question 10
Triggered when finger stays for >500ms:
-
✔️ onLongPress
-
❌ onPress
-
❌ onPressIn
-
❌ onPressOut
📘 Summary Table
| Q | Correct Answer | ✔️ |
|---|---|---|
| 1 | useColorScheme, useWindowDimensions | ✔️ |
| 2 | ImageBackground | ✔️ |
| 3 | True | ✔️ |
| 4 | cover, contain, stretch | ✔️ |
| 5 | Local + Network images | ✔️ |
| 6 | Snippet with resizeMode="contain" |
✔️ |
| 7 | useAppState | ✔️ |
| 8 | True | ✔️ |
| 9 | Same props as Image | ✔️ |
| 10 | onLongPress | ✔️ |