Skip to content

Commit

Permalink
Merge pull request #54 from InbarDanieli/feat/update-react-to-v-18
Browse files Browse the repository at this point in the history
feat: update react to version 18
  • Loading branch information
chibat committed Mar 26, 2023
2 parents 7937eae + cd75067 commit c74083a
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 71 deletions.
102 changes: 43 additions & 59 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions package.json
Expand Up @@ -17,14 +17,14 @@
"url": "https://github.com/chibat/chrome-extension-typescript-starter.git"
},
"dependencies": {
"react": "^17.0.1",
"react-dom": "^17.0.1"
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"devDependencies": {
"@types/chrome": "0.0.158",
"@types/jest": "^27.0.2",
"@types/react": "^17.0.0",
"@types/react-dom": "^17.0.0",
"@types/react": "^18.0.29",
"@types/react-dom": "^18.0.11",
"copy-webpack-plugin": "^9.0.1",
"glob": "^7.1.6",
"jest": "^27.2.1",
Expand Down
9 changes: 5 additions & 4 deletions src/options.tsx
@@ -1,5 +1,5 @@
import React, { useEffect, useState } from "react";
import ReactDOM from "react-dom";
import { createRoot } from "react-dom/client";

const Options = () => {
const [color, setColor] = useState<string>("");
Expand Down Expand Up @@ -68,9 +68,10 @@ const Options = () => {
);
};

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

root.render(
<React.StrictMode>
<Options />
</React.StrictMode>,
document.getElementById("root")
</React.StrictMode>
);
9 changes: 5 additions & 4 deletions src/popup.tsx
@@ -1,5 +1,5 @@
import React, { useEffect, useState } from "react";
import ReactDOM from "react-dom";
import { createRoot } from "react-dom/client";

const Popup = () => {
const [count, setCount] = useState(0);
Expand Down Expand Up @@ -49,9 +49,10 @@ const Popup = () => {
);
};

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

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

0 comments on commit c74083a

Please sign in to comment.