Files
react/compiler/crates/react_hermes_parser/tests/fixtures/error.invalid-set-and-read-ref-during-render.js
2024-04-02 16:49:31 -07:00

6 lines
109 B
JavaScript

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