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.
25 lines
497 B
Plaintext
25 lines
497 B
Plaintext
---
|
|
source: crates/oxc_react_compiler/tests/snapshot.rs
|
|
input_file: crates/oxc_react_compiler/fixtures/constant-computed.js
|
|
---
|
|
import { c as _c } from "react/compiler-runtime";
|
|
function Component(props) {
|
|
const $ = _c(2);
|
|
let x;
|
|
if ($[0] !== props.foo) {
|
|
x = {};
|
|
x["foo"] = x["foo"] + x["bar"];
|
|
x["foo"](props.foo);
|
|
$[0] = props.foo;
|
|
$[1] = x;
|
|
} else {
|
|
x = $[1];
|
|
}
|
|
return x;
|
|
}
|
|
export const FIXTURE_ENTRYPOINT = {
|
|
fn: Component,
|
|
params: ["TodoAdd"],
|
|
isComponent: "TodoAdd"
|
|
};
|