Test yourself under real exam conditions: 50 timed questions, 60 on the clock, pass mark 70%%. Instant score with a full review of everything you got wrong. Free — no account needed.
Exam details
The default flexDirection is 'column' in React Native, which differs from the web's default of 'row'. Children stack vertically from top to bottom unless you change flexDirection to 'row', 'row-reverse', or 'column-reverse'.
Apply style={{flex: 1}} or alignSelf: 'stretch' to the Text component. Without these, Text only wraps its content. flex: 1 grows the component to fill remaining space along the main axis.
SafeAreaView renders content within device areas not covered by notches, status bars, or home indicators. It's primarily useful on iOS devices with notches and works best with the react-native-safe-area-context library for cross-platform handling.
useState triggers a re-render when updated and is meant for state that affects the UI. useRef returns a mutable object (.current) that persists across renders without causing re-renders, ideal for storing references like timer IDs or previous values.
Stack.Navigator manages a stack of screens where users push and pop views, typically used for hierarchical navigation flows. Tab.Navigator displays a tab bar at the bottom (or top) for switching between peer-level screens, like in a settings interface.