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

Doesn't work if scrolling to a section on a different route #98

Open brian-o-mars opened 2 years ago

brian-o-mars commented 2 years ago

My issue was previously reported here but it seems to not have been resolved yet.

rafgraph commented 2 years ago

Scrolling to a section on different route works fine in the example app https://react-router-hash-link.rafgraph.dev so my guess is it’s an issue with your code. Note that it won’t smooth scroll to a section on a different route.

If you think it’s an issue with this package please provide a failing example using code sandbox. Thanks.