嘗試鏈接到具有錨定標記的同一頁面,但正如我使用的反應路由器HashLocation如下,路由器捕獲它阻止錨點正常工作,除了生產「無路線匹配路徑」的錯誤。使用錨定標記鏈接到使用反應路由器hashlocation的相同頁面
Router.run(routes, Router.HashLocation, (Root) => { React.render(<Root/>, document.body); });
同樣的問題已被要求在下面的鏈接,使用「HistoryLocation」的一些暗示,但我要堅持用「HashLocation」和那些鏈接不提供具體的答案,因而需要幫助:
1)How to use normal anchor links with react-router 2)Using React-Router to link within a page
我不知道是否有某種過濾器在路由器排除一些散列,以便我可以使用默認的相同頁面錨鏈接。