Module 02 · Lesson 04
Layout and touch
Flexbox, safe areas and buttons thumbs can hit.
Build screens7 min
| Web habit | In React Native |
|---|---|
| div / span / p | View and Text (all text must be inside Text) |
| button / onClick | Pressable with onPress |
| CSS file | StyleSheet.create, or NativeWind for Tailwind classes |
| Flex is row by default | Flex is column by default |
- Make touch targets at least 44×44 points.
- Wrap screens in SafeAreaView (react-native-safe-area-context) so the notch doesn't cover content.
- Test on a small phone and a big one before you call a screen done.