Files
bun-src/test/bundler/transpiler/react-compiler-fixtures/for-of-capture-item-of-local-collection-mutate-later.js
T
2026-08-27 21:09:14 +00:00

20 lines
394 B
JavaScript

import {makeObject_Primitives} from 'shared-runtime';
function Component(props) {
let lastItem = {};
const items = [makeObject_Primitives(), makeObject_Primitives()];
for (const x of items) {
lastItem = x;
}
if (lastItem != null) {
lastItem.a += 1;
}
return items;
}
export const FIXTURE_ENTRYPOINT = {
fn: Component,
params: [{}],
sequentialRenders: [{}, {}],
};