mirror of
https://github.com/facebook/react.git
synced 2026-02-27 03:07:57 +00:00
26 lines
289 B
JavaScript
26 lines
289 B
JavaScript
function foo(a, b, c) {
|
|
let x = [];
|
|
if (a) {
|
|
x.push(a);
|
|
}
|
|
let y = <div>{x}</div>;
|
|
|
|
switch (b) {
|
|
case 0: {
|
|
x = [];
|
|
x.push(b);
|
|
break;
|
|
}
|
|
default: {
|
|
x = [];
|
|
x.push(c);
|
|
}
|
|
}
|
|
return (
|
|
<div>
|
|
{y}
|
|
{x}
|
|
</div>
|
|
);
|
|
}
|