Components, layout and platform differences · core
Core components and accessibility props
React Native turns host components such as View, Text, Image, TextInput, ScrollView and Pressable into real native views, every string must be inside <Text>, and screen readers (VoiceOver, TalkBack) understand your UI through props like accessibilityRole, accessibilityLabel and accessibilityState.
Explain it out loud
Explain it out loud to an AI interviewer that follows up, and see where your answer is thin.
Practise by voiceThe notes
What you must know
- View becomes a UIView on iOS and an Android ViewGroup. Text is the only component that can render strings; a bare string outside <Text> is an error.
- Pressable is the modern touch component (onPress, onLongPress, a pressed state, hitSlop). Prefer it over the older Touchable* components.
- ScrollView renders ALL its children at once. Use FlatList, SectionList or FlashList for long or unbounded lists.
- TextInput: controlled (value + onChangeText) re-renders on every key. On heavy screens an uncontrolled input (defaultValue + ref) is lighter.
- Network images need a size. resizeMode only changes how the image is drawn, not the decoded size. ImageBackground was deprecated in 0.87.
- Accessibility: accessibilityRole ("button", "checkbox", "link"…), accessibilityLabel, accessibilityHint, accessibilityState ({ checked, disabled }), accessible to group children, touch targets of about 44–48 dp, and support font scaling.
- Since 0.84 a Text with onPress gets the role "link" automatically. 0.85 deprecated setAccessibilityFocus in favour of sendAccessibilityEvent. Always test with real VoiceOver and TalkBack.
The red pen
Common traps: mistake → fix
Mistake: "ScrollView with .map is fine for 500 rows"
Fix: ScrollView mounts every row; use a virtualized list.
Mistake: "Icons do not need labels"
Fix: an icon-only button needs accessibilityLabel.
Mistake: "Turn off font scaling so the design does not break"
Fix: cap it with maxFontSizeMultiplier instead.
Easy to hard
Questions interviewers ask, easy to hard
- What does a View become on iOS and on Android?
- Why does a string outside <Text> fail?
- ScrollView vs FlatList: when do you use each?
- Make a custom checkbox built from Pressable accessible. Which props?
- How do you test accessibility on a device?
Explain it out loud
Explain it out loud to an AI interviewer that follows up, and see where your answer is thin.
Practise by voiceYour first interview is free
Sign up and start with a 15-minute interview with the full report, and an English conversation. No card needed.