Thuta Learning
React Native
BasicMobile DevelopmentIntermediate

Your First App — Hello World

React NativeLesson 320 min

What you'll walk away with

  • Explain the React and native-platform behavior of Your First App — Hello World
  • Test accessibility, failure, and lifecycle cases
  • Write maintainable, testable, and performant React Native

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.

Mental model
  1. JavaScript state
  2. native component and layout
  3. Android or iOS UI

Explain the React and native-platform behavior of Your First App — Hello World

Core syntax or pattern

javascript
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

  1. JavaScript stateimport { 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).

  2. native component and layoutconst 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.

  3. 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.

Execution flow
  1. JavaScript state
  2. native component and layout
  3. 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

javascript
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',
  },
});
You should see
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
javascript
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

What best describes the core idea of Your First App — Hello World?

Quick quiz 2 / 3

Which mistake should you avoid first?

Quick quiz 3 / 3

How should this be applied in a real project?

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

Easy traps

  • 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)
  • Writing StyleSheet.create as an array/string instead of an object literal
  • Assuming one simulator's happy path proves every real-device, release-build, permission, accessibility, offline, and lifecycle path.

Hands-on Exercise

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.

You'll know it worked when: The message 'My first React Native app!' appears centered on your phone screen.

Updated on

Progress is saved only in this browser on this device. It isn't synced to other devices.

Report a problem with this lessonOpens your email app with this lesson's address filled in — nothing is sent until you send it.

Your First App — Hello World | Thuta Learning