function Component(props) {
const x = useMemo(() => {
let y = [];
if (props.cond) {
y.push(props.a);
}
if (props.cond2) {
return y;
}
y.push(props.b);
return y;
});
return x;
}
function Component(props) {
const x = useMemo(() => {
let y = [];
if (props.cond) {
y.push(props.a);
}
if (props.cond2) {
return y;
}
y.push(props.b);
return y;
});
return x;
}