Skip to content

Commit b3e9e83

Browse files
authored
Merge pull request #341 from CraigRamey/upgrade-react-18
Updated React to 18, testing-library to 14
2 parents 4b7d8b3 + 52dfc46 commit b3e9e83

File tree

4 files changed

+450
-105
lines changed

4 files changed

+450
-105
lines changed

.node-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
16.19.1

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@
1212
"framer-motion": "^2.0.0-beta.52",
1313
"markdown-to-jsx": "6.11.0",
1414
"query-string": "6.11.1",
15-
"react": "16.13.0",
15+
"react": "18.2.0",
1616
"react-content-loader": "5.0.2",
1717
"react-copy-to-clipboard": "5.0.2",
1818
"react-diff-view": "2.4.2",
19-
"react-dom": "16.13.0",
19+
"react-dom": "18.2.0",
2020
"react-dom-confetti": "0.1.3",
2121
"react-ga": "2.7.0",
2222
"react-github-btn": "1.1.1",
@@ -26,7 +26,7 @@
2626
},
2727
"devDependencies": {
2828
"@emotion/babel-preset-css-prop": "10.0.27",
29-
"@testing-library/react": "^10.0.3",
29+
"@testing-library/react": "^14.0.0",
3030
"customize-cra": "^0.9.1",
3131
"customize-cra-react-refresh": "^1.0.1",
3232
"eslint": "6.8.0",

src/index.jsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
import React from 'react'
2-
import ReactDOM from 'react-dom'
2+
import { createRoot } from 'react-dom/client'
33
import './index.css'
44
import App from './App'
55
import * as serviceWorker from './serviceWorker'
66

7-
ReactDOM.render(<App />, document.getElementById('root'))
7+
const container = document.getElementById('root')
8+
const root = createRoot(container)
9+
root.render(<App />)
810

911
// If you want your app to work offline and load faster, you can change
1012
// unregister() to register() below. Note this comes with some pitfalls.

0 commit comments

Comments
 (0)