INNER CODE UNIT · TypeScript
createFactory
infernojs/inferno · packages/inferno-compat/src/index.ts:412
function createFactory<P>(type: ComponentType<P>): ElementFactory<P, unknown>;
function createFactory(type) {
return createElement.bind(null, type);
}
// Returns the root component instance, T is its class
function render<T extends JSX.ElementClass = Component>(
rootInput,
container,
cb: (() => void) | null = null,
context = EMPTY_OBJ,
): T | undefined {
renderInternal(rootInput, container, cb, context);
const input = container.$V;
if (input && input.flags & VNodeFlags.Component) {
return input.children;