Files

20 lines
437 B
TypeScript
Raw Permalink Normal View History

2026-08-27 21:09:14 +00:00
import {useMemo} from 'react';
// react-hooks-deps would error on this code (complex expression in depslist),
// so Forget could bailout here
function App({text, hasDeps}) {
const resolvedText = useMemo(
() => {
return text.toUpperCase();
},
hasDeps ? null : [text], // should be DCE'd
);
return resolvedText;
}
export const FIXTURE_ENTRYPOINT = {
fn: App,
params: ['TodoAdd'],
isComponent: 'TodoAdd',
};