diff --git a/docs/plugin-transform-react-jsx.md b/docs/plugin-transform-react-jsx.md index d05ec8b3f9..e5c7b6634c 100644 --- a/docs/plugin-transform-react-jsx.md +++ b/docs/plugin-transform-react-jsx.md @@ -8,7 +8,7 @@ sidebar_label: transform-react-jsx ### React Automatic Runtime -Automatic runtime is a feature available in v7.9.0. With this runtime enabled, the functions that JSX compiles to will be imported automatically. +The automatic runtime is the default in v8.0.0. When enabled, the functions that Babel compiles JSX to are automatically imported. **In** @@ -251,7 +251,7 @@ With options: "@babel/plugin-transform-react-jsx", { "throwIfNamespace": false, // defaults to true - "runtime": "automatic", // defaults to classic + "runtime": "classic", // defaults to automatic "importSource": "custom-jsx-library" // defaults to react } ] @@ -320,15 +320,3 @@ Note that the `@jsx React.DOM` pragma has been deprecated as of React v0.12 `string`, defaults to `React.Fragment`. Replace the component used when compiling JSX fragments. - -### `useBuiltIns` - -`boolean`, defaults to `false`. - -When spreading props, use `Object.assign` directly instead of Babel's extend helper. - -### `useSpread` - -`boolean`, defaults to `false`. - -When spreading props, use inline object with spread elements directly instead of Babel's extend helper or `Object.assign`. diff --git a/docs/preset-react.md b/docs/preset-react.md index b1204a21f0..e6674ae874 100644 --- a/docs/preset-react.md +++ b/docs/preset-react.md @@ -49,11 +49,11 @@ With options: [ "@babel/preset-react", { - "pragma": "dom", // default pragma is React.createElement (only in classic runtime) - "pragmaFrag": "DomFrag", // default is React.Fragment (only in classic runtime) + // "pragma": "dom", // default pragma is React.createElement (only in classic runtime) + // "pragmaFrag": "DomFrag", // default is React.Fragment (only in classic runtime) "throwIfNamespace": false, // defaults to true - "runtime": "classic" // defaults to classic - // "importSource": "custom-jsx-library" // defaults to react (only in automatic runtime) + "runtime": "automatic", // defaults to automatic + "importSource": "custom-jsx-library" // defaults to react (only in automatic runtime) } ] ] @@ -80,7 +80,7 @@ require("@babel/core").transform("code", { #### `runtime` -`classic | automatic`, defaults to `classic` +`classic | automatic`, defaults to `automatic` Decides which runtime to use. @@ -126,18 +126,6 @@ Replace the function used when compiling JSX expressions. Replace the component used when compiling JSX fragments. -#### `useBuiltIns` - -`boolean`, defaults to `false`. - -Will use the native built-in instead of trying to polyfill behavior for any plugins that require one. - -#### `useSpread` - -`boolean`, defaults to `false`. - -When spreading props, use inline object with spread elements directly instead of Babel's extend helper or `Object.assign`. - ### .babelrc.js ```js