Skip to content

Commit

Permalink
Remove deprecated ReactDOM.render
Browse files Browse the repository at this point in the history
  • Loading branch information
Jbekker committed Oct 22, 2024
1 parent fab74a5 commit 43fa169
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import React from "react";
import ReactDOM from "react-dom";
import App from "./App";
import "./style.css";
import { currentVersion } from "./constants/versions";
import { Buffer } from 'buffer';
import { createRoot } from 'react-dom/client';

window.Buffer = Buffer;
/*
Expand Down Expand Up @@ -33,4 +33,6 @@ if (version < currentVersion) {
indexedDB.deleteDatabase(dbname);
}

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

0 comments on commit 43fa169

Please sign in to comment.