This link work nicely
import { HashLink as Link } from 'react-router-hash-link';
<Link to={{pathname: '/features', hash: 'some-feature'}}>
<h2 id="some-feature">Some feature</h2>
</Link>
But when I enter the url into a new browser window:
/features#some-feature
The browser does not scroll to that element.
So scroll to element on link click works perfectly. What logic do I need to add to get scroll to element on page load?