Skip to content

Module quiz: Pressable, Images and Hooks in React Native :React Native (Meta iOS Developer Professional Certificate) Answers 2026

Question 1

Which of these hooks belong to the core React Native package? Select all that apply.

useWindowDimensions
useColorScheme
❌ useAppState

Explanation:
useWindowDimensions aur useColorScheme core React Native hooks hain.
useAppState React Native ka hook nahi hai; AppState API alag tarike se use hoti hai.


Question 2

Which component would you use to display a background image on your mobile screen?

❌ View
ImageBackground
❌ Image

Explanation:
ImageBackground specifically background image ke upar children render karne ke liye bana hota hai.


Question 3

The Pressable component can accept child/children elements that can be a clickable area.

True

Explanation:
Pressable ek wrapper hai jo children components ko clickable area bana deta hai.


Question 4

What are the values accepted by the resizeMode prop to the Image component? Select all that apply.

cover
❌ left
stretch
contain

Explanation:
Valid resizeMode values hain: cover, contain, stretch (aur repeat, center).
left valid value nahi hai.


Question 5

Which of the following statements are true about the Image component? Select all that apply.

❌ The Image component cannot fetch and display images from a network location.
The Image component can fetch and display images from a network.
The Image component can fetch and display images from local storage.

Explanation:
Image component local assets aur remote URLs dono se images load kar sakta hai.


Question 6

Examine the emulator below and determine which code snippets will produce this output (Little Lemon logo with resize mode contain).

First code snippet
❌ Second code snippet
❌ Third code snippet

Explanation:
Correct snippet me resizeMode: 'contain' properly set hota hai Image style ya prop me.


Question 7

Which hook would you use to determine whether the app’s current state is active, inactive, or backgrounded?

useAppState
❌ useKeyboard
❌ useDeviceOrientation

Explanation:
App ke lifecycle states (active / background / inactive) track karne ke liye AppState hook use hota hai.


Question 8

The useState hook is used when you want to handle data that changes over time or comes from user interaction within a component.

True

Explanation:
useState dynamic data (form input, counters, toggles) handle karta hai.


Question 9

Which of the following is true about the ImageBackground component?

The ImageBackground component has the same props as the Image component.
❌ The ImageBackground component has props different from the Image component.

Explanation:
ImageBackground internally Image hi use karta hai, isliye same props support karta hai.


Question 10

Which of the following methods is triggered when the person leaves their finger longer than 500 ms before removing it from a Pressable component?

onLongPress
❌ onPressIn
❌ onPress
❌ onPressOut

Explanation:
onLongPress default ~500ms ke baad trigger hota hai jab user finger hold karta hai.


🧾 Summary Table

Q Correct Answer(s) Key Concept
1 useWindowDimensions, useColorScheme Core hooks
2 ImageBackground Background images
3 True Pressable children
4 cover, stretch, contain resizeMode
5 Network + local images Image sources
6 First snippet resizeMode contain
7 useAppState App lifecycle
8 True useState
9 Same props as Image ImageBackground
10 onLongPress Pressable events