mirror of
https://github.com/oxc-project/oxc.git
synced 2026-09-14 19:36:11 +08:00
daf03ff25d
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.
6 lines
125 B
TypeScript
6 lines
125 B
TypeScript
// @validateRefAccessDuringRender @compilationMode:"infer"
|
|
|
|
export function Button({ref}) {
|
|
return <button ref={ref} />;
|
|
}
|