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