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

11 lines
194 B
JavaScript

function f(a, b) {
let x = []; // <- x starts being mutable here.
if (a.length === 1) {
if (b) {
x.push(b); // <- x stops being mutable here.
}
}
return <div>{x}</div>;
}