Skip to content

Commit

Permalink
Update React API Usage
Browse files Browse the repository at this point in the history
  • Loading branch information
nelsonjchen committed Apr 16, 2023
1 parent 2841a9b commit 831e81e
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions src/popup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,19 @@
*/

import React from "react";
import ReactDOM from "react-dom";
import * as ReactDOMClient from "react-dom/client";
import App from "./Popup/App";

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

if (!container) {
throw new Error("Could not find root element");
}

const root = ReactDOMClient.createRoot(container);

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

0 comments on commit 831e81e

Please sign in to comment.