Skip to content

Commit 89b2a4b

Browse files
committed
Update code for React 19
1 parent ea11668 commit 89b2a4b

File tree

4 files changed

+5176
-3796
lines changed

4 files changed

+5176
-3796
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
/node_modules
55
/.pnp
66
.pnp.js
7+
yarn.lock
78

89
# testing
910
/coverage

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
"version": "1.0.0",
44
"private": true,
55
"dependencies": {
6-
"@dhx/trial-scheduler": "^7.0.3",
6+
"@dhx/trial-scheduler": "^7.2.3",
77
"@testing-library/jest-dom": "^5.16.1",
88
"@testing-library/react": "^12.1.2",
99
"@testing-library/user-event": "^13.5.0",
10-
"react": "^17.0.2",
11-
"react-dom": "^17.0.2",
12-
"react-scripts": "5.0.0"
10+
"react": "^19.0.0",
11+
"react-dom": "^19.0.0",
12+
"react-scripts": "5.0.1"
1313
},
1414
"scripts": {
1515
"start": "react-scripts start",

src/index.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
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 root = createRoot(document.getElementById("root"));
8+
9+
root.render(<App />)
10+
811

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

0 commit comments

Comments
 (0)