Files
bun-src/test/bundler/transpiler/react-compiler-fixtures/repro-ref-mutable-range.tsx
T

20 lines
401 B
TypeScript
Raw Normal View History

2026-08-27 21:09:14 +00:00
import {Stringify, identity, mutate, CONST_TRUE} from 'shared-runtime';
function Foo(props, ref) {
const value = {};
if (CONST_TRUE) {
mutate(value);
return <Stringify ref={ref} />;
}
mutate(value);
if (CONST_TRUE) {
return <Stringify ref={identity(ref)} />;
}
return value;
}
export const FIXTURE_ENTRYPOINT = {
fn: Foo,
params: [{}, {current: 'fake-ref-object'}],
};