React and antd: Router doesn't re-render components
问题 I have a simple web page with login and search pages. I also have a navbar at the top to allow for switching between the two. The basic App.js looks as follows: const history = createBrowserHistory(); function App() { return ( <Router history={history}> <CustomLayout> <Switch> <BaseRouter/> </Switch> </CustomLayout> </Router> ); } export default App; Now, the BaseRouter and CustomLayout are just const BaseRouter = () => ( <div> <Route exact path={"/list"} component={ItemsList}/> <Route path={