So, first I had an issue with the routes not working, but I resolved that with react-router-dom's "baseline" property, but now despite the home page loading, the subsequent links render beneath the first component, which is supposed to dissapear entirely when the link is clicked.
It works fine locally.
This is my app.js
import React from 'react'; import './App.css'; import Navbar from './Component/Navbar/Navbar'; import RecipeList from './Component/RecipeList/RecipeList'; import { Switch, Route, BrowserRouter } from 'react-router-dom' import RecipeItemDetails from './Component/RecipeItemDetails/RecipeItemDetails'; function App() { return ( <BrowserRouter basename={process.env.PUBLIC_URL}> <div className="App"> <Navbar/> <Route exact path="/" component={RecipeList} /> <Route path="/recipes/:id" component={RecipeItemDetails} /> </div> </BrowserRouter> ); } export default App; any ideas? I've tried adding "exact" to the second route which didnt work, and I've also tried wrapping the router in a "switch", but that doesnt work either. I'm stumped.