Skip to main content

Command Palette

Search for a command to run...

rockzy-link: a React Link component that thinks ahead

Updated
•2 min read•View as Markdown

Every React app navigates. And every user can feel it when navigation is slow — that half-second of emptiness between clicking a link and seeing the next page. I got tired of that, so I built rockzy-link: a production-ready React Link component that thinks ahead.

What it is

rockzy-link is a drop-in replacement for the standard React Link. It keeps the API you already know, and adds a brain:

  • Smart prefetching — intelligently prefetches routes the user is likely to visit next, so navigation feels instant
  • Route caching — previously visited routes are cached, making return visits feel like they never left
  • Scroll restoration — your users land exactly where they expect to, every time
  • Built-in accessibility — proper semantics and focus management out of the box
  • Offline hooks — hooks that respond gracefully when connectivity drops
  • Navigation snapshots — capture and restore navigation state for richer app behavior

Get started in 30 seconds

npm i rockzy-link
import { Link } from 'rockzy-link';

function Nav() {
  return <Link to="/dashboard">Dashboard</Link>;
}

That's it. Same API, smarter navigation.

Why I built it

I'm Dominic Rockson, a developer from Liberia. I work in Zig and JavaScript, and I spend a lot of time thinking about how software feels to use. Where I'm from, fast connections aren't guaranteed — every wasted network round-trip is felt by real users. I wanted navigation that feels instant even when the network isn't, so I built the Link component I always wished existed.

Try it out

rockzy-link is MIT licensed — use it anywhere, no strings attached. It's open source and will stay that way.

Feedback is genuinely welcome: open an issue, suggest a feature, or just star the repo if it helps you build something. Happy navigating! 🚀