1. I use ant-design "s menu navigation, plus react-router 4, everything else is normal, but when the page is refreshed, the routing address remains before refresh, while menu is not
I originally wanted to set defaultkey, for menu and Synchronize, but menu is written in layout, and layout is a package of route, that cannot get the current routing address in layout, so the default key cannot be set for menu
ask Daniel, can you tell me whether you can get the current routing address in layout, or whether you can keep the route and menu highlighting consistent after page refresh
related codes
<HashRouter>
<Layout>
<Switch>
<Route path="/index" component={nav1} />
<Route path="/check" component={nav2} />
<Route path="/deliver" component={nav3} />
<Route path="/network/site" component={nav3} />
<Route path="/network/server" component={nav3} />
</Switch>
</Layout>
</HashRouter>