Files
oxc-project__oxc/crates/oxc_react_compiler/fixtures/destructure-object-param-to-context-var.js
Boshen 4e591ed4ed fix(react_compiler): support destructured context parameters (#25724)
Fix destructured function and rest parameters that become context variables by lowering them through temporaries before `StoreContext`. This avoids inconsistent `Destructure`/context HIR and compiles supported components correctly.

Validated with `just ready` and runtime equivalence checks against React 19.2.1's compiler runtime.

AI usage: Implemented with assistance from OpenAI Codex.
2026-08-16 03:04:17 +00:00

13 lines
208 B
JavaScript

import {identity} from 'shared-runtime';
function Component({x}) {
x = identity(x);
const read = () => x;
return read();
}
export const FIXTURE_ENTRYPOINT = {
fn: Component,
params: [{x: 42}],
};