Spaces:
Running
Running
| import React from 'react'; | |
| import { createRoot } from 'react-dom/client'; // Use createRoot for React 18+ | |
| import './index.css'; // Import global CSS | |
| import App from './App'; // Import your main App component | |
| import reportWebVitals from './reportWebVitals'; // For performance tracking (optional) | |
| // Get the root element from the HTML | |
| const container = document.getElementById('root'); | |
| // Create a root for the React application | |
| const root = createRoot(container); | |
| // Render the App component into the root | |
| root.render( | |
| <React.StrictMode> | |
| <App /> | |
| </React.StrictMode> | |
| ); | |
| // If you want to start measuring performance in your app, pass a function | |
| // to log results (for example: reportWebVitals(console.log)) | |
| // or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals | |
| reportWebVitals(); | |