mirror of
https://github.com/oxc-project/oxc.git
synced 2026-09-14 19:36:11 +08:00
975181512c
Closes #25918. Supersedes #25919. References react/react#37234. AI-assisted.
26 lines
507 B
Plaintext
26 lines
507 B
Plaintext
---
|
|
source: crates/oxc_react_compiler/tests/snapshot.rs
|
|
input_file: crates/oxc_react_compiler/fixtures/capturing-func-alias-computed-mutate-iife.js
|
|
---
|
|
import { c as _c } from "react/compiler-runtime";
|
|
const { mutate } = require("shared-runtime");
|
|
function component(a) {
|
|
const $ = _c(2);
|
|
let y;
|
|
if ($[0] !== a) {
|
|
const x = { a };
|
|
y = {};
|
|
y["x"] = x;
|
|
mutate(y);
|
|
$[0] = a;
|
|
$[1] = y;
|
|
} else {
|
|
y = $[1];
|
|
}
|
|
return y;
|
|
}
|
|
export const FIXTURE_ENTRYPOINT = {
|
|
fn: component,
|
|
params: ["foo"]
|
|
};
|