23 lines · 620 B · TypeScript
RawDownload
import { createRouter, RouterHistory } from "@tanstack/react-router"; import { routeTree } from "./routeTree.gen"; export function getRouter(history: RouterHistory) {  return createRouter({    routeTree,    history,    context: {},    // Route components are split chunks (autoCodeSplitting in vite.config);    // fetching them on hover/focus intent hides the load from the first    // settings or pull-request navigation.    defaultPreload: "intent",  });} export type AppRouter = ReturnType<typeof getRouter>; declare module "@tanstack/react-router" {  interface Register {    router: AppRouter;  }}

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t