// Auto-render: look for exported component or App
const AppComponent = typeof App !== 'undefined' ? App : null;
if (AppComponent) {
const root = ReactDOM.createRoot(document.getElementById('root'));
root.render();
} else {
console.warn('No component found to render. Define a function called App or use export default.');
const errorDiv = document.createElement('div');
errorDiv.style.cssText = 'padding: 20px; color: #c00;';
errorDiv.textContent = 'Error: No React component found. Your JSX file should export a default component or define a function called App.';
document.getElementById('root').appendChild(errorDiv);
}