Navigated to /docs/getting-started/linking-and-navigating

Linking and navigating

Move between routes while preserving browser history, focus, scroll position, and useful loading feedback.

Prefetch when intent is clear

prefetchRoute can resolve a likely destination before the click without changing the URL or rendering the route's pending component. Use it for focused or hovered high-probability links, not every route in the application. getRouteStatus exposes idle, loading, prefetching, ready, redirecting, and error states without duplicating the router state machine.

Create src/navigation/prefetch-projects.ts

TS
tsimport { getRouteStatus, prefetchRoute } from "@tavojs/core/router";

export async function prefetchProjects() {
  await prefetchRoute("/projects");
  return getRouteStatus("/projects");
}

Checkpoint

Next steps