Merge pull request #325 from c-bata/fix-create-root-warning

Fix warning for the use of `ReactDOM.render()`
This commit is contained in:
Masashi Shibata
2022-12-29 13:27:59 +09:00
committed by GitHub
+3 -4
View File
@@ -1,10 +1,9 @@
import React from "react"
import { render } from "react-dom"
import ReactDOM from "react-dom/client"
import { App } from "./components/App"
render(
ReactDOM.createRoot(document.getElementById("dashboard") as HTMLElement).render(
<React.StrictMode>
<App />
</React.StrictMode>,
document.getElementById("dashboard")
</React.StrictMode>
)