Files
bun-src/test/bundler/transpiler/react-compiler-fixtures/reduce-reactive-cond-deps-break-in-scope.ts
2026-08-27 21:09:14 +00:00

22 lines
369 B
TypeScript

function useFoo({obj, objIsNull}) {
const x = [];
b0: {
if (objIsNull) {
break b0;
} else {
x.push(obj.a);
}
x.push(obj.b);
}
return x;
}
export const FIXTURE_ENTRYPOINT = {
fn: useFoo,
params: [{obj: null, objIsNull: true}],
sequentialRenders: [
{obj: null, objIsNull: true},
{obj: {a: 2}, objIsNull: false},
],
};