Files
oxc-project__oxc/crates/oxc_react_compiler/fixtures/allow-jsx-ref-destructured-parameter.tsx
Boshen daf03ff25d fix(react-compiler): bail out on JSX ref property loads (#25739)
Bail out when JSX `ref` values are loaded through properties, matching React Compiler and preserving getter and live-binding evaluation semantics.

The validator previously stopped temporary tracking for every property result inferred as ref-like instead of only stopping for `ref.current`.

Validation: `cargo test -p oxc_react_compiler` and `just ready`.

AI assistance: Codex was used to investigate and prepare this change; the contributor remains responsible for reviewing it before merge.
2026-08-16 13:25:12 +00:00

6 lines
125 B
TypeScript

// @validateRefAccessDuringRender @compilationMode:"infer"
export function Button({ref}) {
return <button ref={ref} />;
}