Open AKluger opened 5 years ago
I've been using react-router-hash-link for all of ever, but the issue with it is that it works perfectly on click but not on load.
I've added a version of this library to my library collection that has some added improvements already
https://www.npmjs.com/package/@marzahn-dev/react-scroll-anchor https://github.com/leon-marzahn/marzahn-dev/tree/main/libs/react/scroll-anchor
If you're looking for a more actively maintained solution that works with
react-router-dom
and has support for TypeScript, consider checking out react-router-hash-link.