After I imports from reacts and rendering to app.js, I got a blank page though I just upgraded to react18. here is my code below.
import React from 'react';
import { createRoot } from 'react-dom/client';
import { BrowserRouter } from 'react-router-dom';
import App from './App';
const container = document.getElementById('root');
const root = createRoot(container);
root.render(
<BrowserRouter>
<App />
</BrowserRouter>
);
and I got this error below in my console
the above error occurred in the component: at meta
at HomePage at Routes (http://localhost:3000/static/js/bundle.js:40123:5) at App at Router (http://localhost:3000/static/js/bundle.js:40056:15) at BrowserRouter (http://localhost:3000/static/js/bundle.js:38865:5)
My App Component
import { Routes, Route } from 'react-router-dom';
import HomePage from './pages/Home';
function App() {
return (
<Routes>
<Route path='/' element={<HomePage />} />
</Routes>
);
}
export default App;