React Router display one component for all routes ( a header)
问题 Have a question regarding react router. I have a header item that I would like to display for all routes. And of course, I want this to be part of the so that the user can click items from a nav. Currently I have my <Header /> outside of my <Router> and I guess this isn´t working since my router then don't know to re-render? import { BrowserRouter as Router, Route, Switch } from 'react-router-dom' <div> <Header /> <Router> <Switch> <Route exact path="/" component={Posts} /> <Route exact path=