Skip to content

Commit

Permalink
Replaced deprecated render with createRoot
Browse files Browse the repository at this point in the history
  • Loading branch information
adrien-dimitri committed Aug 2, 2024
1 parent 19f801d commit 1e25863
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
*/

import React from "react";
import { render } from "react-dom";
import { createRoot } from "react-dom/client";

import App from "./App";

render(<App></App>, document.getElementById("app"));
const container = document.getElementById("app");
const root = createRoot(container);
root.render(<App />);

0 comments on commit 1e25863

Please sign in to comment.