Skip to content

Guide · Open source

How to use react-native-web: clone, build and test the monorepo

Updated · written with AI from the project's own documentation and checked against our catalogue data

react-native-web is the development monorepo for React Native for Web, a set of packages that let React Native style components run on the web. This guide covers what the repository contains and how to clone, build, develop and test its packages, as described in the README. After reading it you will be able to set up the repo locally and run the build, dev and test tasks.

React Native for Webnecolas/react-native-web · ★ 22.2k · MIT

Quick start

  1. 1Check prerequisites. Install Node.js and npm before you start. The README lists these as the prerequisites.
  2. 2Clone the repository. Run git clone https://github.com/necolas/react-native-web in your terminal.
  3. 3Build all packages. From the repository root, run npm run build to run the build script in every package.
  4. 4Build or develop one package. Use npm run build -w <package-name> or npm run dev -w <package-name> to target a single package.
  5. 5Run tests. Run npm run test to execute tests for every package.
  6. 6Read the contributing guide. Before proposing changes, read the contributing guide to learn the development process.

What is in the react-native-web repository?

The repository is organized as a monorepo. The README lists three top-level folders: .github, packages and scripts.

The .github folder contains GitHub Actions workflows and issue templates. The packages folder holds the individual packages managed in the monorepo, including react-native-web. The scripts folder contains Node.js scripts for miscellaneous tasks.

  • .github: GitHub Actions workflows and issue templates
  • packages: individual packages, including react-native-web
  • scripts: Node.js scripts for miscellaneous tasks

Clone the react-native-web repository

The README's install method is to clone the repository and build it. You need Node.js and npm installed first, as listed in the prerequisites.

  • Prerequisites: Node.js and npm
git clone https://github.com/necolas/react-native-web

Build all packages or a single package

Run the build script for every package from the repository root. To build only one package, pass its name with the -w flag. The README uses <package-name> as a placeholder, so substitute the actual workspace name.

npm run build npm run build -w <package-name>

Run the dev script

The README describes a dev task that runs the dev script in every package. You can also target one package with -w, using the same placeholder pattern as the build task.

npm run dev npm run dev -w <package-name>

Run the tests

The test task runs tests for every package in the monorepo. The README does not describe per-package test flags, so this guide only shows the command it documents.

npm run test

Contribute changes

Development happens in the open on GitHub. The README points to a contributing guide that explains the development process, how to propose bugfixes and improvements, and how to build and test your changes. A list of good first issues is also linked for newcomers.

The project expects participants to follow Meta's open source Code of Conduct, which the README links to.

  • Read the contributing guide in .github/CONTRIBUTING.md
  • Look at the good first issues list on GitHub
  • Follow the Code of Conduct

What people use it for

  • Developing or fixing the react-native-web package itself
  • Working on the build, dev and test tasks across packages in the monorepo
  • Picking up a good first issue as a new contributor
  • Reading the package source to understand how the monorepo is laid out

Frequently asked questions

What is react-native-web used for?

According to the README, react-native-web is the development monorepo for React Native for Web, a set of packages that let React Native style components run on the web. The README itself focuses on how the repository is organized and how to build, develop and test it.

What do I need to install react-native-web?

The README lists Node.js and npm as the prerequisites. The install method shown is to clone the repository and then run the build script.

What is the install command for react-native-web?

The README shows git clone https://github.com/necolas/react-native-web to get the code, followed by npm run build to build all packages.

Is react-native-web free to use?

The repository is licensed under MIT, as stated in its listing. Check the LICENSE file in the repository for the full terms.

How do I build only one package in react-native-web?

Use npm run build -w <package-name>, replacing the placeholder with the workspace name of the package you want. The same pattern works for npm run dev -w <package-name>.

Does the README explain how to use react-native-web components in an app?

No. The README excerpt covers repository structure, build, dev and test tasks, and contributing. It does not describe the library's API or usage details, so check the project homepage at https://necolas.github.io/react-native-web for usage information.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

This repository suits React Native developers who want to work on react-native-web itself, or teams who want to follow its build and test process. If you only need to add a library to an existing app and want usage docs from this README, the excerpt does not cover that, so look elsewhere in the project documentation.

Install options & downloads