Opt-into react 18 concurrent renderer

This commit is contained in:
Willian Mitsuda 2022-08-06 23:40:59 -03:00
parent 8ad1c7186b
commit 6b9d8f6190
1 changed files with 5 additions and 4 deletions

View File

@ -1,5 +1,5 @@
import React from "react";
import ReactDOM from "react-dom";
import { createRoot } from "react-dom/client";
import { HelmetProvider, Helmet } from "react-helmet-async";
import "@fontsource/space-grotesk/index.css";
import "@fontsource/roboto/index.css";
@ -9,7 +9,9 @@ import "./index.css";
import App from "./App";
import reportWebVitals from "./reportWebVitals";
ReactDOM.render(
const container = document.getElementById("root");
const root = createRoot(container!);
root.render(
<React.StrictMode>
<HelmetProvider>
<Helmet>
@ -23,8 +25,7 @@ ReactDOM.render(
</Helmet>
<App />
</HelmetProvider>
</React.StrictMode>,
document.getElementById("root")
</React.StrictMode>
);
// If you want to start measuring performance in your app, pass a function