whatisgithub

What is react-router-hash-link?

methuselah96/react-router-hash-link — explained in plain English

Analysis updated 2026-07-18 · repo last pushed 2019-07-20

JavaScriptAudience · developerComplexity · 1/5DormantSetup · easy

In one sentence

A drop-in replacement for React Router's Link that actually scrolls the page to the matching #hash section, including content that loads asynchronously.

Mindmap

mindmap
  root((repo))
    What it does
      Scrolls to hash links
      Handles async content
      Drop-in Link replacement
    Tech stack
      JavaScript
      React Router
    Use cases
      Fix broken anchor links
      Smooth scroll navigation
      Custom scroll offsets
    Audience
      React developers

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Replace React Router's Link with HashLink so anchor links like #contact actually scroll to that section.

USE CASE 2

Add smooth scrolling to in-page navigation instead of an instant jump.

USE CASE 3

Write custom scroll logic to account for a fixed header when scrolling to a section.

USE CASE 4

Use HashLink with a custom Link implementation such as Gatsby's.

What is it built with?

JavaScriptReact Router

How does it compare?

methuselah96/react-router-hash-link3rd-eden/ircb.ioa15n/a15n
LanguageJavaScriptJavaScriptJavaScript
Last pushed2019-07-202016-11-162019-04-07
MaintenanceDormantDormantDormant
Setup difficultyeasyeasyeasy
Complexity1/52/52/5
Audiencedeveloperdevelopergeneral

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 5min

Requires React Router's BrowserRouter to work.

Copy-paste prompts

Prompt 1
Help me replace React Router's Link with HashLink so my #faq anchor links actually scroll into view.
Prompt 2
Explain how react-router-hash-link handles scrolling to content that loads asynchronously.
Prompt 3
Show me how to make HashLink scroll smoothly instead of jumping instantly to the target section.
Prompt 4
How do I use react-router-hash-link with a fixed header so it scrolls with extra top padding?

Frequently asked questions

What is react-router-hash-link?

A drop-in replacement for React Router's Link that actually scrolls the page to the matching #hash section, including content that loads asynchronously.

What language is react-router-hash-link written in?

Mainly JavaScript. The stack also includes JavaScript, React Router.

Is react-router-hash-link actively maintained?

Dormant — no commits in 2+ years (last push 2019-07-20).

How hard is react-router-hash-link to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is react-router-hash-link for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.