Files
react/compiler/crates/react_hermes_parser/tests/fixtures/destructure-direct-reassignment.js
2024-04-02 16:49:31 -07:00

8 lines
175 B
JavaScript

function foo(props) {
let x, y;
({ x, y } = { x: props.a, y: props.b });
console.log(x); // prevent DCE from eliminating `x` altogether
x = props.c;
return x + y;
}