I am learning react and I got stuck on a problem. I have started working on routing but its not working at all.
Code:
import {Route} from 'react-router-dom'
import AllMeetupsPage from './pages/AllMeetups';
import NewMeetupsPage from './pages/NewMeetups';
import FavoritesPage from './pages/Favorites';
function App() {
return (
<div>
<Route path = '/'>
<AllMeetupsPage />
</Route>
<Route path = '/new-meetup'>
<NewMeetupsPage />
</Route>
<Route path = '/favorites'>
<FavoritesPage />
</Route>
</div>
);
}
export default App;
I have a blank screen even though the pages should load. Each page when open should only print one line just to see that I can see routing working however all I see is a blank space meaning its not working correctly.
You can view the full code here: https://github.com/Kroplewski-M/Routing