Explain it simply
Your First App — Hello World, in plain language
The entry point of an Expo project is App.js (or App.tsx), which default-exports a React component function — the structure is basically the same as a React web app's App.js. Inside the component you return JSX, and the root element needs to be wrapped in a <View> (just like wrapping in a <div> on React web).
Problem → Why → Solution
The problem — why this concept matters
Writing a raw string directly in JSX outside a <Text> component (in React Native, text must be wrapped in <Text> or it throws an error)
A common mistake
Writing StyleSheet.create as an array/string instead of an object literal
Core concept — understand how it works
Understand Your First App — Hello World as part of a React Native 0.87 system connecting React 19.2, Hermes V1, Fabric, TurboModules, and the Strict TypeScript API. Keep the boundary between shared TypeScript and platform-specific native behavior explicit.
- JavaScript state
- native component and layout
- Android or iOS UI
Explain the React and native-platform behavior of Your First App — Hello World
Core syntax or pattern
import { View, Text, StyleSheet } from 'react-native';
export default function App() {
return (
<View style={styles.container}>
<Text>My first React Native app!</Text>
</View>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#fff',
alignItems: 'center',
justifyContent: 'center',
},
});Understand Your First App — Hello World as part of a React Native 0.87 system connecting React 19.2, Hermes V1, Fabric, TurboModules, and the Strict TypeScript API. Keep the boundary between shared TypeScript and platform-specific native behavior explicit.
Read the code step by step
- JavaScript state
import { View, Text, StyleSheet } from 'react-native';The entry point of an Expo project is App.js (or App.tsx), which default-exports a React component function — the structure is basically the same as a React web app's App.js. Inside the component you return JSX, and the root element needs to be wrapped in a <View> (just like wrapping in a <div> on React web).
- native component and layout
const styles = StyleSheet.create({Understand Your First App — Hello World as part of a React Native 0.87 system connecting React 19.2, Hermes V1, Fabric, TurboModules, and the Strict TypeScript API. Keep the boundary between shared TypeScript and platform-specific native behavior explicit.
- Android or iOS UI
});Test an original Your First App — Hello World example on Android and iOS with small and large screens, font scaling, dark mode, keyboard and screen reader use, slow/offline networking, denied permissions, and background/foreground transitions. Use DevTools, tests, and a release build where relevant.
- JavaScript state
- native component and layout
- Android or iOS UI
Success
Explain the React and native-platform behavior of Your First App — Hello World
Failure
Writing a raw string directly in JSX outside a <Text> component (in React Native, text must be wrapped in <Text> or it throws an error)
Let's think about this for a moment
The entry point of an Expo project is App.js (or App.tsx), which default-exports a React component function — the structure is basically the same as a React web app's App.js. Inside the component you return JSX, and the root element needs to be wrapped in a <View> (just like wrapping in a <div> on React web).
Let's connect this to a real scenario
If you rewrite the line <Text>Open up App.js to start working on your app!</Text> in App.js with your own message and save, the Expo Go app on your phone will hot reload and update instantly — you'll get to experience that fast save-and-see iteration loop.
Code Example
import { View, Text, StyleSheet } from 'react-native';
export default function App() {
return (
<View style={styles.container}>
<Text>My first React Native app!</Text>
</View>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#fff',
alignItems: 'center',
justifyContent: 'center',
},
});The message 'My first React Native app!' appears centered on your phone screen.5-Minute Try-It
Rewrite the Text message in App.js with your own words, save, and watch it update on your phone.
A Quick Heads-Up
In React Native, text (strings) must be written inside a <Text> component — putting a string directly inside a <View> will throw an error. There's no free-floating text like in HTML.
Real-world usage
How to apply it in a real project
Test an original Your First App — Hello World example on Android and iOS with small and large screens, font scaling, dark mode, keyboard and screen reader use, slow/offline networking, denied permissions, and background/foreground transitions. Use DevTools, tests, and a release build where relevant.
Mini challenge
Build it yourself
Test an original Your First App — Hello World example on Android and iOS with small and large screens, font scaling, dark mode, keyboard and screen reader use, slow/offline networking, denied permissions, and background/foreground transitions. Use DevTools, tests, and a release build where relevant.
- Rebuild the example without copying it
- Test a normal input and an edge case
- Predict the compiler or output result before running it
import { View, Text, StyleSheet } from 'react-native';
export default function App() {
return (
<View style={styles.container}>
<Text>My first React Native app!</Text>
</View>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#fff',
alignItems: 'center',
justifyContent: 'center',
},
});Expected: Explain the React and native-platform behavior of Your First App — Hello World
Show hint
Test an original Your First App — Hello World example on Android and iOS with small and large screens, font scaling, dark mode, keyboard and screen reader use, slow/offline networking, denied permissions, and background/foreground transitions. Use DevTools, tests, and a release build where relevant.
Quick quiz 1 / 3
Quick quiz 2 / 3
Quick quiz 3 / 3
What to remember
- JavaScript state → native component and layout → Android or iOS UI
- Understand Your First App — Hello World as part of a React Native 0.87 system connecting React 19.2, Hermes V1, Fabric, TurboModules, and the Strict TypeScript API. Keep the boundary between shared TypeScript and platform-specific native behavior explicit.
- Writing a raw string directly in JSX outside a <Text> component (in React Native, text must be wrapped in <Text> or it throws an error)
- Test an original Your First App — Hello World example on Android and iOS with small and large screens, font scaling, dark mode, keyboard and screen reader use, slow/offline networking, denied permissions, and background/foreground transitions. Use DevTools, tests, and a release build where relevant.
React Native 0.87 Release — React Native