Skip to content

Commit

Permalink
fix(react): use createRoot
Browse files Browse the repository at this point in the history
  • Loading branch information
mman committed Sep 18, 2024
1 parent a221e8e commit c674f80
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import "react-app-polyfill/stable"
import React from "react"
import ReactDOM from "react-dom"
import { createRoot } from "react-dom/client"
import { getParameterByName } from "./app/utils/util"
import registerServiceWorker from "./serviceWorkerRegistration"
import * as Sentry from "@sentry/react"
Expand Down Expand Up @@ -80,7 +80,10 @@ Sentry.init({
},
})

ReactDOM.render(<React.StrictMode>{getApp()}</React.StrictMode>, document.getElementById("root"))
const container = document.getElementById("root")
const root = createRoot(container!)

root.render(<React.StrictMode>{getApp()}</React.StrictMode>)

registerServiceWorker()

Expand Down

0 comments on commit c674f80

Please sign in to comment.