RE

React Native Web

react-native-web

React Native for Web

React Native Libraries
react
react-component
react-native
web
react-native-web
React Native Libraries
javascript
npm
frontend
open source
Stars
22k
Weekly
5.6M
Open issues
166
Bundle
~15 kB

Installation

npm install react-native-web

Code example

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

export function Example() {
  return (
    <View style={styles.box}>
      <Text style={styles.title}>Web</Text>
      <Web />
    </View>
  );
}

const styles = StyleSheet.create({
  box: { flex: 1, alignItems: "center", justifyContent: "center", gap: 12 },
  title: { fontSize: 18, fontWeight: "600" },
});

Pros & cons

Pros

  • Actively maintained by Nicolas Gallagher
  • 5.6M weekly downloads. Battle tested
  • MIT licensed

Considerations

  • Adds roughly ~15 kB to your bundle
  • Needs client-only rendering in SSR frameworks
  • 166 open issues on GitHub

FAQs

Alternatives & similar libraries