From f9218ac9ff14f27f7058ebec9406c198717d3a5d Mon Sep 17 00:00:00 2001 From: ivandevp Date: Fri, 18 Oct 2019 09:19:01 -0500 Subject: [PATCH 1/2] [transform-react-jsx] Add useSpread option to babel-transform-react-jsx doc --- docs/plugin-transform-react-jsx.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/plugin-transform-react-jsx.md b/docs/plugin-transform-react-jsx.md index dec65694dd..34927c0856 100644 --- a/docs/plugin-transform-react-jsx.md +++ b/docs/plugin-transform-react-jsx.md @@ -192,6 +192,12 @@ Replace the component used when compiling JSX fragments. 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`. + ### `throwIfNamespace` `boolean`, defaults to `true`. From 34a94c930180d1f10c616a4c901ab68d38c7a1b7 Mon Sep 17 00:00:00 2001 From: ivandevp Date: Tue, 29 Oct 2019 08:54:35 -0600 Subject: [PATCH 2/2] Add useSpread to preset-react --- docs/preset-react.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/preset-react.md b/docs/preset-react.md index f706d84cd8..4e640234f7 100644 --- a/docs/preset-react.md +++ b/docs/preset-react.md @@ -90,6 +90,12 @@ Replace the component used when compiling JSX fragments. 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`. + ### `development` `boolean`, defaults to `false`.