Skip to content

Commit 65678c5

Browse files
committed
docs: fix description for jsxRuntime option
1 parent eeb4914 commit 65678c5

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

docs/pages/build.md

+8-4
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,14 @@ If you're using [`@babel/preset-env`](https://babeljs.io/docs/babel-preset-env)
251251

252252
You can set the [`babelrc`](https://babeljs.io/docs/en/options#babelrc) option to `true` to enable using `.babelrc` files. Similar considerations apply as with the `configFile` option.
253253

254+
##### `jsxRuntime`
255+
256+
By default, JSX is compiled to use the `automatic` [runtime](https://babeljs.io/docs/babel-preset-react#runtime) [introduced in React 17](https://legacy.reactjs.org/blog/2020/09/22/introducing-the-new-jsx-transform.html). This transform is also compatible with React 16.14.0, React 15.7.0, and React 0.14.10.
257+
258+
If you want to use the classic runtime for any other reason, you can set the `jsxRuntime` option to `classic` explicitly.
259+
260+
This option has no effect when overriding the default babel configuration without using `react-native-builder-bob/babel-preset`.
261+
254262
##### `copyFlow`
255263

256264
If your source code is written in [Flow](http://www.typescriptlang.org/), You can specify the `copyFlow` option to `true` to copy the source files as `.js.flow` to the output folder. If the `main` entry in `package.json` points to the `index` file in the output folder, the flow type checker will pick these files up to use for type definitions.
@@ -277,10 +285,6 @@ Example:
277285
["module", { "esm": true, "sourceMaps": false }]
278286
```
279287

280-
##### `jsxRuntime`
281-
282-
Explicitly set your [runtime](https://babeljs.io/docs/babel-preset-react#runtime). Defaults to `automatic`.
283-
284288
#### `typescript`
285289

286290
Enable generating type definitions with `tsc` if your source code is written in [TypeScript](http://www.typescriptlang.org/).

0 commit comments

Comments
 (0)