Files

25 lines
378 B
TypeScript
Raw Permalink Normal View History

2026-08-27 21:09:14 +00:00
// @validateRefAccessDuringRender
import {useRef} from 'react';
function Component() {
const ref = useRef(null);
const onClick = () => {
if (ref.current !== null) {
ref.current = '';
}
};
return (
<>
<input ref={ref} />
<button onClick={onClick} />
</>
);
}
export const FIXTURE_ENTRYPOINT = {
fn: Component,
params: [{}],
};