Skip to content

Commit af98a79

Browse files
docs: document React entry point in main.jsx
Added English comments explaining the React.StrictMode wrapper and the root rendering process using the new React 18 createRoot API.
1 parent 3119395 commit af98a79

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/main.jsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@ import ReactDOM from 'react-dom/client'
33
import App from './App.jsx'
44
import './index.css'
55

6+
// Initialize the root element and render the application
67
ReactDOM.createRoot(document.getElementById('root')).render(
8+
/* StrictMode is a tool for highlighting potential problems in an application.
9+
It activates additional checks and warnings for its descendants.
10+
*/
711
<React.StrictMode>
812
<App />
913
</React.StrictMode>,

0 commit comments

Comments
 (0)