12 lines
196 B
JavaScript
12 lines
196 B
JavaScript
|
function Component(props) {
|
||
|
const x = (() => {
|
||
|
label: {
|
||
|
if (props.cond) {
|
||
|
break label;
|
||
|
}
|
||
|
return props.a;
|
||
|
}
|
||
|
return props.b;
|
||
|
}) |> useMemo(%);
|
||
|
return x;
|
||
|
}
|