From 7923d64758052d3831b21b05e916ba00b62d15eb Mon Sep 17 00:00:00 2001 From: Evan Petersen Date: Fri, 6 Oct 2023 11:41:14 -0400 Subject: [PATCH] Update to React 18 --- eclipsing-binary-simulator/package-lock.json | 1 + eclipsing-binary-simulator/package.json | 8 ++++---- eclipsing-binary-simulator/src/main.jsx | 5 +++-- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/eclipsing-binary-simulator/package-lock.json b/eclipsing-binary-simulator/package-lock.json index 0a73a6de01..b56aebcbfb 100644 --- a/eclipsing-binary-simulator/package-lock.json +++ b/eclipsing-binary-simulator/package-lock.json @@ -5,6 +5,7 @@ "requires": true, "packages": { "": { + "name": "eclipsing-binary-simulator", "version": "0.1.0", "license": "GPL-3.0+", "dependencies": { diff --git a/eclipsing-binary-simulator/package.json b/eclipsing-binary-simulator/package.json index 03f5a1f8c7..c5bcf76fe8 100644 --- a/eclipsing-binary-simulator/package.json +++ b/eclipsing-binary-simulator/package.json @@ -30,15 +30,15 @@ "d3-drag": "~3.0.0", "eslint-plugin-security": "^1.4.0", "pixi.js": "~7.3.0", - "react": "~17.0.1", - "react-dom": "~17.0.1", - "react-range-step-input": "~1.3.0" + "react": "^18.2.0", + "react-dom": "^18.2.0", + "react-range-step-input": "github:Evan-CTL/react-range-step-input" }, "devDependencies": { "@babel/core": "^7.5.5", + "@babel/eslint-parser": "^7.15.8", "@babel/preset-env": "^7.5.5", "@babel/preset-react": "^7.0.0", - "@babel/eslint-parser": "^7.15.8", "babel-loader": "^9.0.1", "eslint": "^8.0.1", "eslint-plugin-react": "~7.33.2", diff --git a/eclipsing-binary-simulator/src/main.jsx b/eclipsing-binary-simulator/src/main.jsx index 5b0bd95fe1..30f29544e4 100644 --- a/eclipsing-binary-simulator/src/main.jsx +++ b/eclipsing-binary-simulator/src/main.jsx @@ -1,5 +1,5 @@ import React from 'react'; -import ReactDOM from 'react-dom'; +import { createRoot } from 'react-dom/client'; import {RangeStepInput} from 'react-range-step-input'; import LightcurveView from './LightcurveView'; import BinarySystemView from './BinarySystemView'; @@ -1321,4 +1321,5 @@ class EclipsingBinarySimulator extends React.Component { } const domContainer = document.querySelector('#sim-container'); -ReactDOM.render(, domContainer); +const root = createRoot(domContainer); +root.render();