Skip to content

Commit

Permalink
refactor ReactDom with ReactDOMClient for react 18
Browse files Browse the repository at this point in the history
  • Loading branch information
maisamaf committed Apr 10, 2023
1 parent c9e7fc1 commit 5450bcf
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,17 @@ Coded by www.creative-tim.com
*/

import React from "react";
import ReactDOM from "react-dom";
import * as ReactDOMClient from "react-dom/client";
import { BrowserRouter } from "react-router-dom";
import App from "App";

ReactDOM.render(
const container = document.getElementById("root");

// Create a root.
const root = ReactDOMClient.createRoot(container);

root.render(
<BrowserRouter>
<App />
</BrowserRouter>,
document.getElementById("root")
</BrowserRouter>
);

0 comments on commit 5450bcf

Please sign in to comment.