Skip to content

Commit 667955e

Browse files
committed
Migrate to createRoot
- Use new `createRoot` API from React v18.
1 parent 6952dc9 commit 667955e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/renderer/renderer.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ import '_public/style.css';
66

77
import App from '_renderer/App';
88
import * as React from 'react';
9-
import * as ReactDOM from 'react-dom';
9+
import { createRoot } from 'react-dom/client';
1010

11-
ReactDOM.render(
12-
<App />,
13-
document.getElementById('app'),
14-
);
11+
const container = document.getElementById('app');
12+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
13+
const root = createRoot(container!);
14+
root.render(<App />);

0 commit comments

Comments
 (0)