Files
oxc-project__oxc/crates/oxc_react_compiler/fixtures/symbol-call.js
Boshen 721a8eaced fix(react_compiler): preserve Symbol identity (#25597)
Model `Symbol()` as identity-bearing so escaping symbols are memoized, matching Babel. The regression came from registering `Symbol` with copy-like primitive globals while allowing capitalized built-in calls.

Validation: `cargo test -p oxc_react_compiler`; Babel output comparison; runtime identity check. `just ready` is blocked by three unrelated ANSI-sensitive Oxlint snapshot mismatches in this environment.

AI-assisted: Codex was used to investigate, implement, verify, and prepare this PR.
2026-08-13 13:44:56 +00:00

5 lines
110 B
JavaScript

function Component() {
const historyKey = Symbol('history');
return <Widget historyKey={historyKey} />;
}