Show diff by sentence (#477)
This commit is contained in:
parent
505caa9aff
commit
b3aa3cb18a
6 changed files with 105 additions and 145 deletions
|
|
@ -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(),
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue