You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/mona-high-school-fitness-tracker.md
+21Lines changed: 21 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -666,6 +666,27 @@ Create the following components
666
666
667
667
Basic username password authentication is fine
668
668
669
+
### index.js potential React version issues
670
+
671
+
The error indicates that the ReactDOM.render function is not available in the version of React you are using. This is because React 18 introduced a new root API for rendering.
672
+
673
+
To fix this issue, update your src/index.js file to use the new createRoot API provided by React 18. Here's the updated code:
674
+
675
+
```javascript
676
+
importReactfrom'react';
677
+
importReactDOMfrom'react-dom/client'; // Use the new root API
678
+
import'./index.css';
679
+
importAppfrom'./App';
680
+
import'bootstrap/dist/css/bootstrap.min.css';
681
+
682
+
constroot=ReactDOM.createRoot(document.getElementById('root')); // Create a root
0 commit comments