Description:
This is a solution to ‘React Router’s issue of not scrolling to #hash-links’ when using the <Link> component to navigate. It uses a Router onUpdate hook and calls element.scrollIntoView() if a #hash is present in the url.
This is a solution to ‘React Router’s issue of not scrolling to #hash-links’ when using the <Link> component to navigate. It uses a Router onUpdate hook and calls element.scrollIntoView() if a #hash is present in the url.