Skip to content

Commit 3167a4f

Browse files
committed
update index to use createRoot vs render
1 parent 2368d80 commit 3167a4f

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/index.tsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from "react";
2-
import ReactDOM from "react-dom";
2+
import ReactDOM from "react-dom/client";
33
import App from '@app/index';
44

55
if (process.env.NODE_ENV !== "production") {
@@ -16,4 +16,10 @@ if (process.env.NODE_ENV !== "production") {
1616
axe(React, ReactDOM, 1000, config);
1717
}
1818

19-
ReactDOM.render(<App />, document.getElementById("root") as HTMLElement);
19+
const root = ReactDOM.createRoot(document.getElementById("root"));
20+
21+
root.render(
22+
<React.StrictMode>
23+
<App />
24+
</React.StrictMode>
25+
)

0 commit comments

Comments
 (0)