I use HashRouter in my react app and the landing page is single-page which use react-scrollchor component to scroll to some section with animation. Say I defined #service section in the landing page, when I click Service and the page scroll to the anchor and finally the URL turn to /#/service(should be /#service), the page is blank. And I leave the example page here
I've read discussion in #394, and I have no idea what's the solution for the anchor link in react-router-dom.
Hello,
I use HashRouter in my react app and the landing page is single-page which use
react-scrollchor
component to scroll to some section with animation. Say I defined#service
section in the landing page, when I clickService
and the page scroll to the anchor and finally the URL turn to/#/service
(should be/#service
), the page is blank. And I leave the example page hereI've read discussion in #394, and I have no idea what's the solution for the anchor link in react-router-dom.
And the scroller code
Thanks.