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.
12 lines
231 B
TypeScript
12 lines
231 B
TypeScript
// @validateRefAccessDuringRender
|
|
|
|
function App() {
|
|
const {refs, floatingStyles} = useFloating();
|
|
return (
|
|
<>
|
|
<div ref={refs.setReference} />
|
|
<div ref={refs.setFloating} style={floatingStyles} />
|
|
</>
|
|
);
|
|
}
|