React Native theorytheory 0/50 · 0%
Foundations · easy

1. What React Native is

A framework for building native mobile apps with React and JavaScript.

React Native lets you write one JavaScript/TypeScript codebase and render truly native UI widgets on iOS and Android, instead of a web view wrapped in a shell.

Your components describe UI with JSX, exactly like React for the web, but instead of `<div>`/`<span>` you use platform primitives like `<View>` and `<Text>`. These are translated to native `UIView`/`ViewGroup` equivalents.

import { View, Text } from "react-native";

export default function Hello() {
  return (
    <View>
      <Text>gm from React Native</Text>
    </View>
  );
}

Because the JS runs on its own thread and communicates with native code via a bridge (or the newer JSI), you get near-native performance while reusing web-dev skills — handy when a dApp needs a wallet-connect mobile companion app.

Check your understanding

  1. 1. What does React Native render UI as?

  2. 2. Which primitive replaces `<div>` in React Native?

  3. 3. How does JS communicate with native code?