Skip to content

Commit c6953da

Browse files
authored
⚛️ Upgrade to React 18 (#29)
* ⚛️ Upgrade react peerDependency and other devDependencies * 📦 Upgrade deps
1 parent 332e49d commit c6953da

File tree

3 files changed

+484
-393
lines changed

3 files changed

+484
-393
lines changed

example/main.tsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
import React from 'react'
2-
import ReactDOM from 'react-dom'
3-
import './index.css'
4-
import App from './App'
1+
import React from 'react';
2+
import { createRoot } from 'react-dom/client';
3+
import './index.css';
4+
import App from './App';
55

6-
ReactDOM.render(
6+
const root = createRoot(document.getElementById('root'));
7+
root.render(
78
<React.StrictMode>
89
<App />
9-
</React.StrictMode>,
10-
document.getElementById('root')
11-
)
10+
</React.StrictMode>
11+
);

package.json

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -23,21 +23,21 @@
2323
},
2424
"peerDependencies": {
2525
"@splinetool/runtime": "*",
26-
"react": "^17.0.0",
27-
"react-dom": "^17.0.0"
26+
"react": ">=17.0.0",
27+
"react-dom": ">=17.0.0"
2828
},
2929
"devDependencies": {
30-
"@splinetool/runtime": "^0.9.15",
30+
"@splinetool/runtime": "^0.9.35",
3131
"@types/animejs": "^3.1.4",
32-
"@types/node": "^16.11.9",
33-
"@types/react": "^17.0.0",
34-
"@types/react-dom": "^17.0.0",
35-
"@vitejs/plugin-react": "^1.0.0",
32+
"@types/node": "^17.0.27",
33+
"@types/react": "^18.0.7",
34+
"@types/react-dom": "^18.0.2",
35+
"@vitejs/plugin-react": "^1.3.1",
3636
"animejs": "^3.2.1",
37-
"np": "^7.6.0",
38-
"react": "^17.0.0",
39-
"react-dom": "^17.0.0",
40-
"typescript": "^4.3.2",
41-
"vite": "^2.6.4"
37+
"np": "^7.6.1",
38+
"react": "^18.0.0",
39+
"react-dom": "^18.0.0",
40+
"typescript": "^4.6.3",
41+
"vite": "^2.9.5"
4242
}
43-
}
43+
}

0 commit comments

Comments
 (0)