Careeroza
index.html and main.jsx
index.html
The only HTML page. React renders everything inside <div id="root">. The script tag loads main.jsx.
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>My App</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.jsx"></script>
</body>
</html>main.jsx
The entry point. It finds the root div and renders the App component into it. StrictMode enables extra development checks (it renders components twice in development to find bugs).
import { StrictMode } from 'react';
import { createRoot } from 'react-dom/client';
import './index.css';
import App from './App.jsx';
createRoot(document.getElementById('root')).render(
<StrictMode>
<App />
</StrictMode>
);