Show diff by sentence (#477)

This commit is contained in:
Jeremy 2024-11-01 14:13:17 +05:30 committed by GitHub
parent 505caa9aff
commit b3aa3cb18a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 105 additions and 145 deletions

View file

@ -1,9 +1,10 @@
import { createRoot } from "react-dom/client";
import { createRoot } from 'react-dom/client';
export class ReactRenderer {
static render(component: React.ReactElement, dom: HTMLElement) {
const root = createRoot(dom);
root.render(component);
return {
destroy: () => root.unmount(),
};