<Link>

The <Link> component is a utility that extends the <a> element to provide navigation using pushState and page prefetching.

<Link href='/posts/123'> <span>Post 123</span> </Link>

Props

href

The path or URL to navigate to. Required.

replace

Whether to replace the current route with this one instead of adding a new history item. Defaults to false.

scroll

Whether to scroll to the top of the page when navigating. Defaults to true

prefetch

Whether to prefetch the page before the user clicks. Defaults to true.