React Native
Build native iOS and Android apps using React's component model.
CurrentintermediateGuide only -- no course yet
Overview
React Native uses React's component and state model to build apps that compile to genuinely native iOS/Android UI components (not a webview) -- letting React developers apply existing knowledge to mobile, and letting teams share logic between web and mobile.
- What it is
- A framework for building native mobile apps using React's component model, rendering to native platform UI.
- Why it's used
- For teams with existing React expertise, or wanting to share code/logic between web and mobile.
- Where it fits
- After React fundamentals -- React Native reuses React's concepts (components, state, props) with mobile-specific components.
Core concepts
- Native components (View, Text, instead of div/span)
- Navigation libraries
- Platform-specific code
- The bridge between JS and native code
Example
View and Text replace HTML's div and span/p -- the component model is identical to React, but it renders to real native UI elements, not a browser DOM.
function Greeting() {
return (
<View>
<Text>Hello, mobile!</Text>
</View>
);
}Common use cases
- Cross-platform mobile apps sharing one codebase
- Apps needing near-native performance without two separate native codebases
Project ideas
- A simple two-screen app with navigation between a list and a detail view