import * as React from 'react';
import {createRoot, Root} from 'react-dom/client';
import {Attributes, FunctionComponent, ReactHTML, ReactNode} from "react";
export {React};

export function embedReact(id: string, component: FunctionComponent, props: Attributes|null): void {
    createRoot(document.getElementById(id))
        .render(React.createElement(component, props));
}