mirror of
https://github.com/facebook/react.git
synced 2026-02-26 05:35:21 +00:00
24 lines
367 B
JavaScript
24 lines
367 B
JavaScript
function Component(props) {
|
|
let x = [];
|
|
let y;
|
|
switch (props.p0) {
|
|
case 1: {
|
|
break;
|
|
}
|
|
case true: {
|
|
x.push(props.p2);
|
|
y = [];
|
|
}
|
|
default: {
|
|
break;
|
|
}
|
|
case false: {
|
|
y = x;
|
|
break;
|
|
}
|
|
}
|
|
const child = <Component data={x} />;
|
|
y.push(props.p4);
|
|
return <Component data={y}>{child}</Component>;
|
|
}
|