Files
react/compiler/crates/react_hermes_parser/tests/fixtures/array-at-mutate-after-capture.js
2024-04-02 16:49:31 -07:00

11 lines
176 B
JavaScript

// x's mutable range should extend to `mutate(y)`
function Component(props) {
let x = [42, {}];
const idx = foo(props.b);
let y = x.at(idx);
mutate(y);
return x;
}