MCPcopy Index your code
hub / github.com/EasyWebApp/WebCell / lazy

Function lazy

source/Async.tsx:44–53  ·  view source on GitHub ↗
(loader: T)

Source from the content-addressed store, hash-verified

42
43export const lazy =
44 <T extends () => Promise<{ default: FunctionComponent | ClassComponent }>>(loader: T) =>
45 (props: GetAsyncProps<T>) => (
46 <FunctionCell
47 component={async () => {
48 const { default: Tag } = await loader();
49
50 return <Tag {...props} />;
51 }}
52 />
53 );

Callers 2

Async.spec.tsxFile · 0.90
Home.tsxFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected