# Is react-native ESM-only? Can you require() it?

> react-native@0.87.1 is a CommonJS package. CommonJS — require() works on every Node.js version we test.

A framework for building native apps using React

Latest version 0.87.1, published Aug 26, 2026.

react-native ships CommonJS only. require("react-native") should work on every Node.js version the package supports (^22.13.0 || ^24.3.0 || >= 26.0.0); the runtime probe has not run for this version. import "react-native" also works because Node.js and Bun can import CommonJS from ES modules, but only the default export is guaranteed; named imports depend on Node's static analysis of the module.

## What to do

1. require("react-native") should work on every Node.js version the package supports (^22.13.0 || ^24.3.0 || >= 26.0.0); the runtime probe has not run for this version.
2. From ES modules use the default import: import reactNative from "react-native"; then destructure. Named imports only work when Node.js can statically detect the exports.
3. TypeScript: types are bundled; install nothing extra.

## Facts

- Latest: 0.87.1 (Aug 26, 2026)
- Module format: CommonJS
- Last CommonJS version: 0.87.1
- TypeScript types: bundled
- Node engines: ^22.13.0 || ^24.3.0 || >= 26.0.0
- Weekly downloads: 11.9M
- License: MIT

## Runtime test results for react-native@0.87.1

Runtime probe pending for this version (install failed: PROBE_TIMEOUT). The facts above come from package.json.

## How to import react-native

ES modules:

```js
import reactNative from "react-native";
```

CommonJS:

```js
const reactNative = require("react-native");
```

## Module format by version

Derived from the type, main and exports fields of every stable release on npm (381 versions; the newest 60 shown).

| Versions | Format | First published |
|---|---|---|
| 0.76.2 – 1000.0.0 | CommonJS | Nov 14, 2024 |

## Frequently asked

**Is react-native ESM-only?**

react-native@0.87.1 is a CommonJS package. react-native ships CommonJS only. require("react-native") should work on every Node.js version the package supports (^22.13.0 || ^24.3.0 || >= 26.0.0); the runtime probe has not run for this version. import "react-native" also works because Node.js and Bun can import CommonJS from ES modules, but only the default export is guaranteed; named imports depend on Node's static analysis of the module.

**Can I import react-native with ES module syntax?**

Yes. import reactNative from "react-native" works in Node.js and Bun because they support importing CommonJS modules. Named imports work only when Node.js can statically detect the exports.

**Does react-native ship TypeScript types?**

Yes. react-native bundles its own type declarations; no @types package is needed.

## Links

- [react-native on npm](https://www.npmjs.com/package/react-native)
- [Source repository](https://github.com/react/react-native)
- [HTML version](https://canirequire.com/package/react-native/)
- [JSON version](https://canirequire.com/package/react-native.json)

---

For scripts and AI agents: any package is at https://canirequire.com/package/<name>/index.md (Markdown) or https://canirequire.com/package/<name>.json (JSON); the site index is https://canirequire.com/llms.txt. Fetch the URL directly; no search needed.
