MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / component

Function component

__tests__/react-router.test.ts:862–862  ·  view source on GitHub ↗
(name: string)

Source from the content-addressed store, hash-verified

860const routeNames = (cg: CodeGraph): string[] => cg.getNodesByKind('route').map((r) => r.name).sort();
861
862const component = (name: string): string => `export function ${name}() {\n return <div>${name}</div>;\n}\n`;
863
864/** A screen file whose component is its default export. */
865const screen = (name: string): string => `export default function ${name}() {\n return <div>${name}</div>;\n}\n`;

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected