Files
bun-src/test/bundler/transpiler/react-compiler-fixtures/error.invalid-set-and-read-ref-during-render.js
2026-08-27 21:09:14 +00:00

7 lines
143 B
JavaScript

// @validateRefAccessDuringRender
function Component(props) {
const ref = useRef(null);
ref.current = props.value;
return ref.current;
}