What is React Native and how does it relate to React web

· Category: React

Short answer

React Native uses React's declarative UI paradigm to build mobile applications that compile to native platform components instead of HTML.

How it works

Instead of rendering to the browser DOM, React Native renders to native platform views through a bridge. You write JSX using native components like <View> and <Text>, and the framework translates these into platform-specific UI elements.

Example

import { View, Text, StyleSheet } from 'react-native';

export default function App() {
  return (
    <View style={styles.container}>
      <Text>Hello, Native!</Text>
    </View>
  );
}

const styles = StyleSheet.create({
  container: { flex: 1, justifyContent: 'center', alignItems: 'center' },
});

Tips

  • React Native shares React hooks and patterns, but styling and navigation differ significantly.
  • Expo provides a managed workflow for faster development without touching native code.
  • Not all web libraries work out of the box; look for React Native alternatives.