fix: enable React 18 in Explorer via use of `createRoot` (#24859)
This commit is contained in:
parent
112a0b475a
commit
8043e88233
|
@ -1,5 +1,4 @@
|
||||||
import React from "react";
|
import { createRoot } from "react-dom/client";
|
||||||
import ReactDOM from "react-dom";
|
|
||||||
import { BrowserRouter as Router } from "react-router-dom";
|
import { BrowserRouter as Router } from "react-router-dom";
|
||||||
import * as Sentry from "@sentry/react";
|
import * as Sentry from "@sentry/react";
|
||||||
import "./scss/theme-dark.scss";
|
import "./scss/theme-dark.scss";
|
||||||
|
@ -20,7 +19,8 @@ if (process.env.NODE_ENV === "production") {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
ReactDOM.render(
|
const root = createRoot(document.getElementById("root")!);
|
||||||
|
root.render(
|
||||||
<Router>
|
<Router>
|
||||||
<ClusterProvider>
|
<ClusterProvider>
|
||||||
<StatsProvider>
|
<StatsProvider>
|
||||||
|
@ -41,6 +41,5 @@ ReactDOM.render(
|
||||||
</SupplyProvider>
|
</SupplyProvider>
|
||||||
</StatsProvider>
|
</StatsProvider>
|
||||||
</ClusterProvider>
|
</ClusterProvider>
|
||||||
</Router>,
|
</Router>
|
||||||
document.getElementById("root")
|
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue