feat: v1 — persistent shell, model gateway, artifact improvements (#1462)
This commit is contained in:
parent
3651670fb9
commit
f9652b452a
161 changed files with 5166 additions and 8009 deletions
|
|
@ -1,13 +1,13 @@
|
|||
import { createRoot } from "react-dom/client";
|
||||
|
||||
// biome-ignore lint/complexity/noStaticOnlyClass: "Needs to be static"
|
||||
export class ReactRenderer {
|
||||
static render(component: React.ReactElement, dom: HTMLElement) {
|
||||
const root = createRoot(dom);
|
||||
root.render(component);
|
||||
export function renderReactComponent(
|
||||
component: React.ReactElement,
|
||||
dom: HTMLElement
|
||||
) {
|
||||
const root = createRoot(dom);
|
||||
root.render(component);
|
||||
|
||||
return {
|
||||
destroy: () => root.unmount(),
|
||||
};
|
||||
}
|
||||
return {
|
||||
destroy: () => root.unmount(),
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue