tsx-dom-ssr
Version:
A simple way to use tsx syntax to do async server-side-rendering.
8 lines (7 loc) • 473 B
TypeScript
import type { BaseProps, FC, ComponentChildren, VNode } from "./types";
export declare function createHtmlElementNode(tag: string, { children, ...attrs }: BaseProps): VNode;
export declare function createComponentNode(tag: FC<BaseProps>, props: BaseProps): ComponentChildren;
export type InternalComponent<T = BaseProps> = ((props: T) => ComponentChildren) & {
__tsxInternal: boolean;
};
export declare function internalComponent<T>(comp: FC<T>): InternalComponent<T>;