JSTQL-JS-Transform/output_testing/530useMemo-multiple-if-else.js

14 lines
239 B
JavaScript
Raw Normal View History

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