> ## Documentation Index
> Fetch the complete documentation index at: https://loadwise.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# frontend-navigation-without-link

> An onClick handler only navigates to an internal path, so the element has no href crawlers can follow.

## What it flags

A JSX `onClick` whose inline handler does nothing but navigate to a literal same-site path (one starting with `/`): `router.push(path)` with `useRouter` from `next/navigation` or `next/router`, `navigate(path)` with `useNavigate` from React Router, `location.assign(path)`, or an assignment to `window.location` or `location.href`. The element has no `href`, so crawlers never discover the target page and users cannot open it in a new tab. Handlers that do other work before navigating (saving, tracking, signing out), external or computed targets, `/api/` targets (actions and downloads), and `<a>`, `Link` and `NavLink` elements are left alone. A target under a signed-in or transactional segment such as `/account` or `/dashboard`, and navigation inside a package whose folder is named for a signed-in app such as `apps/dashboard` or `packages/admin`, appear only with `--include-contextual`, because crawlers never reach them.

## How to review or fix

Render a `Link` from `next/link` or React Router (or an `<a href>`) styled as the original element, and keep `onClick` only for extra behavior. See the [Google guidance on crawlable links](https://developers.google.com/search/docs/crawling-indexing/links-crawlable).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.