From 579a4e44657ecb92a38163d9a8192ad61f2a1bc8 Mon Sep 17 00:00:00 2001 From: Orka Arnest Cruze Date: Sun, 12 Nov 2023 16:50:05 +0100 Subject: [PATCH] build: upgrade to react 18 --- package.json | 5 +++-- src/main.jsx | 13 +++++-------- yarn.lock | 29 +++++++++++++---------------- 3 files changed, 21 insertions(+), 26 deletions(-) diff --git a/package.json b/package.json index f783a0a..8120033 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,7 @@ { "name": "portfolio", "version": "0.0.0", + "license": "UNLICENSED", "scripts": { "dev": "vite", "build": "vite build", @@ -20,8 +21,8 @@ "i18next": "^21.5.2", "i18next-browser-languagedetector": "^6.1.2", "postcss": "^8.4.31", - "react": "^17.0.0", - "react-dom": "^17.0.0", + "react": "^18.2.0", + "react-dom": "^18.2.0", "react-i18next": "^11.14.2", "react-player": "^2.9.0", "react-router-dom": "^6.0.1", diff --git a/src/main.jsx b/src/main.jsx index 89e4fc9..db5687b 100644 --- a/src/main.jsx +++ b/src/main.jsx @@ -1,15 +1,12 @@ -import "./assets/styles/index.scss"; import "bootstrap"; +import "./assets/styles/index.scss"; import React from "react"; -import ReactDOM from "react-dom"; +import { createRoot } from "react-dom/client"; import App from "./App"; import "./i18n"; -ReactDOM.render( - - - , - document.getElementById("root") -); +const container = document.getElementById("root"); +const root = createRoot(container); +root.render(); diff --git a/yarn.lock b/yarn.lock index cd99000..335b446 100644 --- a/yarn.lock +++ b/yarn.lock @@ -896,14 +896,13 @@ prop-types@^15.7.2, prop-types@^15.8.1: object-assign "^4.1.1" react-is "^16.13.1" -react-dom@^17.0.0: - version "17.0.2" - resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-17.0.2.tgz#ecffb6845e3ad8dbfcdc498f0d0a939736502c23" - integrity sha512-s4h96KtLDUQlsENhMn1ar8t2bEa+q/YAtj8pPPdIjPDGBDIVNsrD9aXNWqspUe6AzKCIG0C1HZZLqLV7qpOBGA== +react-dom@^18.2.0: + version "18.2.0" + resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-18.2.0.tgz#22aaf38708db2674ed9ada224ca4aa708d821e3d" + integrity sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g== dependencies: loose-envify "^1.1.0" - object-assign "^4.1.1" - scheduler "^0.20.2" + scheduler "^0.23.0" react-fast-compare@^3.0.1: version "3.2.0" @@ -954,13 +953,12 @@ react-router@6.3.0: dependencies: history "^5.2.0" -react@^17.0.0: - version "17.0.2" - resolved "https://registry.yarnpkg.com/react/-/react-17.0.2.tgz#d0b5cc516d29eb3eee383f75b62864cfb6800037" - integrity sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA== +react@^18.2.0: + version "18.2.0" + resolved "https://registry.yarnpkg.com/react/-/react-18.2.0.tgz#555bd98592883255fa00de14f1151a917b5d77d5" + integrity sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ== dependencies: loose-envify "^1.1.0" - object-assign "^4.1.1" readdirp@~3.6.0: version "3.6.0" @@ -1004,13 +1002,12 @@ sass@^1.66.1: immutable "^4.0.0" source-map-js ">=0.6.2 <2.0.0" -scheduler@^0.20.2: - version "0.20.2" - resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.20.2.tgz#4baee39436e34aa93b4874bddcbf0fe8b8b50e91" - integrity sha512-2eWfGgAqqWFGqtdMmcL5zCMK1U8KlXv8SQFGglL3CEtd0aDVDWgeF/YoCmvln55m5zSk3J/20hTaSBeSObsQDQ== +scheduler@^0.23.0: + version "0.23.0" + resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.23.0.tgz#ba8041afc3d30eb206a487b6b384002e4e61fdfe" + integrity sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw== dependencies: loose-envify "^1.1.0" - object-assign "^4.1.1" semver@^6.3.0: version "6.3.1"