rafgraph / react-router-hash-link

Hash link scroll functionality for React Router
https://react-router-hash-link.rafgraph.dev
MIT License
732 stars 62 forks source link

How to remove the hash link from history #62

Closed tomcanac closed 4 years ago

tomcanac commented 4 years ago

Hi, First thanks for the packages, does great job!

My question is, how should I handle removing the hash url from history? Basically I want that my back button goes back to the previous page, skipping any sub hash navigation in my current page. What would be the clean way to do this?

Thanks for the help

rafgraph commented 4 years ago

Use replace prop. See https://reacttraining.com/react-router/web/api/Link/replace-bool

tomcanac commented 4 years ago

Thanks a lot!