16 lines
433 B
JavaScript
16 lines
433 B
JavaScript
// @validatePreserveExistingMemoizationGuarantees @enableOptionalDependencies
|
|
import {ValidateMemoization} from 'shared-runtime';
|
|
function Component(props) {
|
|
const data = useMemo(() => {
|
|
const x = [];
|
|
x.push(props?.items);
|
|
if (props.cond) {
|
|
x.push(props?.items);
|
|
}
|
|
return x;
|
|
}, [props?.items, props.cond]);
|
|
return (
|
|
<ValidateMemoization inputs={[props?.items, props.cond]} output={data} />
|
|
);
|
|
}
|