import React from 'react'; import ReactDOM from 'react-dom/client'; import App from './App'; const rootElement = document.getElementById('root'); // Only mount React if a root element exists. // This allows the project to function as a static site (using index.html content) // without the React runtime throwing errors. if (rootElement) { const root = ReactDOM.createRoot(rootElement); root.render( ); } else { console.info("React mount skipped: No 'root' element found. Serving static HTML content."); }