MCPcopy Create free account
hub / github.com/clayrisser/create-react-renderer / createElement

Function createElement

phaseD/src/createElement.ts:4–8  ·  view source on GitHub ↗
(elementType: string, props: any)

Source from the content-addressed store, hash-verified

2import { IElement } from "./elements/BaseElement";
3
4export default function createElement(elementType: string, props: any) {
5 const Element: IElement = elements[elementType];
6 if (!Element) throw new Error(`unknown element of type '${elementType}'`);
7 return new Element(props);
8}

Callers 1

createInstanceFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected