diff --git a/react-sample/package.json b/react-sample/package.json index f614fb26..0f8482ea 100644 --- a/react-sample/package.json +++ b/react-sample/package.json @@ -3,15 +3,15 @@ "version": "0.1.0", "private": true, "dependencies": { - "react": "^16.8.6", - "react-dom": "^16.8.6", - "react-scripts": "0.9.x" + "react": "^18.2.0", + "react-dom": "^18.2.0", + "react-scripts": "0.9.x", + "@react-three/fiber": "^8.2.0" }, - "devDependencies": {}, "scripts": { "start": "react-scripts start", "build": "react-scripts build", "test": "react-scripts test --env=jsdom", "eject": "react-scripts eject" } -} \ No newline at end of file +} diff --git a/react-sample/src/index.js b/react-sample/src/index.js index 54c5ef1a..0302302e 100644 --- a/react-sample/src/index.js +++ b/react-sample/src/index.js @@ -1,9 +1,8 @@ import React from 'react'; -import ReactDOM from 'react-dom'; +import { createRoot } from 'react-dom/client'; import App from './App'; import './index.css'; -ReactDOM.render( - , - document.getElementById('root') -); +const container = document.getElementById('root'); +const root = createRoot(container); +root.render() \ No newline at end of file