React Native · Mobile UI at native speed
How is React Native different from React on the web?
Short answer
Both use React components, but React Native has no DOM. You compose native primitives like View and Text, style with JavaScript objects, and handle platform APIs, navigation and storage differently.
The mental model transfers well: components, props, state, hooks and reconciliation all work the same way. What changes is the host environment. On the web the host elements are DOM nodes; in React Native they are platform views with a smaller and different API surface.
- No div, span, p or img: use View, Text, Image and Pressable
- No CSS files or selectors: styles are objects, often created with StyleSheet.create
- No window or document: use Dimensions, useWindowDimensions and AppState
- Navigation is a library concern such as React Navigation rather than the browser URL
- Storage, permissions, notifications and deep links all go through platform APIs
import { Pressable, Text, View } from "react-native";
export function Button({ label, onPress }: { label: string; onPress: () => void }) {
return (
<Pressable onPress={onPress} style={({ pressed }) => ({ opacity: pressed ? 0.6 : 1 })}>
<View>
<Text>{label}</Text>
</View>
</Pressable>
);
}Accessibility also differs. You use accessibilityLabel, accessibilityRole and accessibilityState rather than HTML semantics. Text must be wrapped in a Text component, and a View cannot directly contain raw strings.
Follow-ups you should expect
Interviewers use these to check whether the first answer was understanding or memorisation.
- 1Can you share code between React and React Native?
- 2Why can't you use CSS in React Native?
- 3How does event handling differ?
- 4What is the equivalent of a div?
Say it in the interview
React Native uses the same component and hooks model, but the host environment is native rather than the DOM. I compose View, Text and Pressable instead of div and span, style with JavaScript objects instead of CSS, and use platform APIs for storage, permissions and navigation. Pure logic and hooks can often be shared, but the UI layer usually needs separate implementations because the primitives and accessibility semantics differ.
Use this as a model, not a script. Saying it in your own words is what makes it survive follow-up pressure.
Related questions
Reading is step one
Now say it out loud.
Understanding an answer and delivering it under pressure are different skills. Rehearse this topic in a live React Native mock interview and get scored feedback on depth, clarity and confidence.