Hoist omitted keys from object spread operator (#13384)

This commit is contained in:
Alan Orozco
2021-05-28 09:32:30 -07:00
committed by GitHub
parent 612f19fbdc
commit f35513fbaa
21 changed files with 110 additions and 35 deletions

View File

@@ -1,9 +1,11 @@
const _excluded = ["outsetArrows"];
function Foo(_ref) {
var _div;
let {
outsetArrows
} = _ref,
rest = babelHelpers.objectWithoutProperties(_ref, ["outsetArrows"]);
rest = babelHelpers.objectWithoutProperties(_ref, _excluded);
return useMemo(() => _div || (_div = <div outsetArrows={outsetArrows} />), [outsetArrows]);
}