Repository: TanStack/router
Pull request #2354 (2024-09-16 21:45:33)

perf(react-router): apply language service performance to `getRouteApi`
I missed this in the original PR

nx-cloud[bot]: # ☁️ Nx Cloud Report

CI is running for commit e4fc12d27562db0154379057bfe678cef5cf455e.

[📂 Click to track the progress, see the status, the terminal output, and the build insights.](https://cloud.nx.app/cipes/66e8a71f55d4304685ee7b40?utm_source=pull-request&utm_medium=comment)


---

Sent with 💌 from [NxCloud.](https://nx.app?utm_source=pull-request&utm_medium=comment)
pkg-pr-new[bot]: 
[Open in Stackblitz](https://pkg.pr.new/template/1f73a414-e732-412c-a065-407a59715069)
<details><summary><b>More templates</b></summary><p>

- [tanstack-router-react-example-authenticated-routes](https://pkg.pr.new/template/28aa9136-00b7-4ddd-ab3b-b1d5fd636e66)
- [tanstack-router-react-example-basic](https://pkg.pr.new/template/6e523890-a277-4092-a3a7-788a01f9b38b)
- [tanstack-router-react-example-basic-default-search-params](https://pkg.pr.new/template/b4a73960-0c8a-4af8-8097-1fd9622d0c34)
- [tanstack-router-react-example-basic-file-based](https://pkg.pr.new/template/4e06a5e8-f73f-4c10-a1a9-c703974d848e)
- [tanstack-router-react-example-basic-file-based-codesplitting](https://pkg.pr.new/template/bec35048-2c3f-4902-855c-49cbed4ae56e)
- [tanstack-router-react-example-react-query](https://pkg.pr.new/template/0cc05dff-c297-417d-86e4-95733aa8ead3)
- [tanstack-router-react-example-basic-react-query-file-based](https://pkg.pr.new/template/6e2c8212-947e-4ab5-9816-60f9e26d8066)
- [tanstack-router-react-example-basic-ssr-file-based](https://pkg.pr.new/template/8494339a-a3b2-4131-a40c-c716621f7cdb)
- [tanstack-router-react-example-basic-ssr-streaming-file-based](https://pkg.pr.new/template/01065e9c-c268-4105-9e59-6df13655ec53)
- [tanstack-router-react-example-basic-virtual-file-based](https://pkg.pr.new/template/04adc489-3353-47fb-b3da-5bff4120e5c2)
- [tanstack-router-react-example-basic-virtual-inside-file-based](https://pkg.pr.new/template/763ce349-5b23-4b4a-9ba7-b4cec96361d0)
- [tanstack-router-react-example-deferred-data](https://pkg.pr.new/template/f2419e9f-05b1-423a-a584-0a6bd820337e)
- [tanstack-router-react-example-kitchen-sink](https://pkg.pr.new/template/86cf9b78-83c7-4c02-accb-21683de4d4f9)
- [tanstack-router-react-example-kitchen-sink-file-based](https://pkg.pr.new/template/26229047-b731-4d5a-8eb8-bc7aa036f04e)
- [tanstack-router-react-example-kitchen-sink-react-query](https://pkg.pr.new/template/49ea099f-0ac5-44b7-bb36-6a97fc08269f)
- [tanstack-router-react-example-kitchen-sink-react-query-file-based](https://pkg.pr.new/template/8c3fcb09-f014-426b-85f8-2f2fef9b21ec)
- [tanstack-router-react-example-large-file-based](https://pkg.pr.new/template/6da32aa2-996a-4cca-a00a-9520a770dcd8)
- [tanstack-router-react-example-location-masking](https://pkg.pr.new/template/9047c233-af2d-4ae9-8046-722dce1d2169)
- [tanstack-router-react-example-navigation-blocking](https://pkg.pr.new/template/28e2f02a-3156-4171-9132-c2b5818f16b2)
- [tanstack-router-react-example-quickstart](https://pkg.pr.new/template/90a523a4-115a-46a7-b692-ee7b19109667)
- [tanstack-router-react-example-quickstart-file-based](https://pkg.pr.new/template/ac8a618d-b469-4528-bfcb-5295e305ea49)
- [tanstack-router-react-example-quickstart-rspack-file-based](https://pkg.pr.new/template/a4903acb-74aa-48c6-85e6-c38aff24d178)
- [tanstack-router-react-example-quickstart-webpack-file-based](https://pkg.pr.new/template/af057f4f-1c77-4fc4-855d-cef6255fb23b)
- [tanstack-router-react-example-scroll-restoration](https://pkg.pr.new/template/13c839a6-ae34-4dda-8978-c72555322452)
- [tanstack-router-search-validator-adapters](https://pkg.pr.new/template/65b00045-1470-430b-b77f-4dcc7b0ceff5)
- [tanstack-router-example-react-start-basic](https://pkg.pr.new/template/8b9e7636-fc2a-49a5-b37d-a60bf97b0427)
- [tanstack-router-example-react-start-basic-auth](https://pkg.pr.new/template/4a8a3986-0f11-486e-82be-a6addd6b0065)
- [tanstack-router-example-react-start-basic-counter](https://pkg.pr.new/template/2d83f48a-6096-4e0d-86aa-f9de2e356c3d)
- [tanstack-router-example-react-start-basic-react-query](https://pkg.pr.new/template/583616c9-b7f2-4865-b78a-8ab37373b36d)
- [tanstack-router-example-react-start-basic-rsc](https://pkg.pr.new/template/55061ed4-e4bd-4d1c-aa2e-9ec73f0bab82)
- [tanstack-router-example-react-start-clerk-basic](https://pkg.pr.new/template/c5d357cf-fbcb-4b95-8742-d7f459b39a00)
- [tanstack-router-example-react-start-trello-trellaux](https://pkg.pr.new/template/78034395-7c7c-426d-b0e5-c4381648baf0)
- [tanstack-router-example-react-start-supabase-basic](https://pkg.pr.new/template/5ffd2234-8f6d-4926-8765-21aa08e4c6cb)
- [tanstack-router-example-react-start-trellaux](https://pkg.pr.new/template/b57f3738-f9bb-46d3-9b43-59520e510eed)
- [tanstack-router-react-example-with-trpc](https://pkg.pr.new/template/818f7625-9381-4b5e-8fd8-589b6b1e2c24)
- [tanstack-router-react-example-with-framer-motion](https://pkg.pr.new/template/80a99046-89fc-4e75-bf76-81e0bc667e14)
- [tanstack-router-react-example-with-trpc-react-query](https://pkg.pr.new/template/35bd6bab-8b80-4286-84b5-c7265d02b4f9)

</p></details>
      
    


<details><summary><b>@tanstack/history</b></summary><p>

```
pnpm add https://pkg.pr.new/@tanstack/history@2354
```

</p></details>
      
    

<details><summary><b>@tanstack/create-router</b></summary><p>

```
pnpm add https://pkg.pr.new/@tanstack/create-router@2354
```

</p></details>
      
    

<details><summary><b>@tanstack/react-cross-context</b></summary><p>

```
pnpm add https://pkg.pr.new/@tanstack/react-cross-context@2354
```

</p></details>
      
    

<details><summary><b>@tanstack/react-router-with-query</b></summary><p>

```
pnpm add https://pkg.pr.new/@tanstack/react-router-with-query@2354
```

</p></details>
      
    

<details><summary><b>@tanstack/react-router</b></summary><p>

```
pnpm add https://pkg.pr.new/@tanstack/react-router@2354
```

</p></details>
      
    

<details><summary><b>@tanstack/router-arktype-adapter</b></summary><p>

```
pnpm add https://pkg.pr.new/@tanstack/router-arktype-adapter@2354
```

</p></details>
      
    

<details><summary><b>@tanstack/router-cli</b></summary><p>

```
pnpm add https://pkg.pr.new/@tanstack/router-cli@2354
```

</p></details>
      
    

<details><summary><b>@tanstack/router-devtools</b></summary><p>

```
pnpm add https://pkg.pr.new/@tanstack/router-devtools@2354
```

</p></details>
      
    

<details><summary><b>@tanstack/router-generator</b></summary><p>

```
pnpm add https://pkg.pr.new/@tanstack/router-generator@2354
```

</p></details>
      
    

<details><summary><b>@tanstack/router-plugin</b></summary><p>

```
pnpm add https://pkg.pr.new/@tanstack/router-plugin@2354
```

</p></details>
      
    

<details><summary><b>@tanstack/router-valibot-adapter</b></summary><p>

```
pnpm add https://pkg.pr.new/@tanstack/router-valibot-adapter@2354
```

</p></details>
      
    

<details><summary><b>@tanstack/router-vite-plugin</b></summary><p>

```
pnpm add https://pkg.pr.new/@tanstack/router-vite-plugin@2354
```

</p></details>
      
    

<details><summary><b>@tanstack/start</b></summary><p>

```
pnpm add https://pkg.pr.new/@tanstack/start@2354
```

</p></details>
      
    

<details><summary><b>@tanstack/router-zod-adapter</b></summary><p>

```
pnpm add https://pkg.pr.new/@tanstack/router-zod-adapter@2354
```

</p></details>
      
    

<details><summary><b>@tanstack/start-vite-plugin</b></summary><p>

```
pnpm add https://pkg.pr.new/@tanstack/start-vite-plugin@2354
```

</p></details>
      
    

<details><summary><b>@tanstack/virtual-file-routes</b></summary><p>

```
pnpm add https://pkg.pr.new/@tanstack/virtual-file-routes@2354
```

</p></details>
      
    

_commit: <a href="https://github.com/TanStack/router/runs/30225570912"><code>e4fc12d</code></a>_


Patch:
diff --git a/docs/framework/react/guide/external-data-loading.md b/docs/framework/react/guide/external-data-loading.md
index 4f2953224..c0907b831 100644
--- a/docs/framework/react/guide/external-data-loading.md
+++ b/docs/framework/react/guide/external-data-loading.md
@@ -175,7 +175,7 @@ export function createRouter() {
     // On the client, hydrate the loader client with the data
     // we dehydrated on the server
     hydrate: (dehydrated) => {
-      hydrate(client, dehydrated.queryClientState)
+      hydrate(queryClient, dehydrated.queryClientState)
     },
     // Optionally, we can use `Wrap` to wrap our router in the loader client provider
     Wrap: ({ children }) => {
diff --git a/examples/react/authenticated-routes/package.json b/examples/react/authenticated-routes/package.json
index 4a22a0f26..a2e2476d7 100644
--- a/examples/react/authenticated-routes/package.json
+++ b/examples/react/authenticated-routes/package.json
@@ -9,8 +9,8 @@
     "start": "vite"
   },
   "dependencies": {
-    "@tanstack/react-router": "^1.57.15",
-    "@tanstack/router-devtools": "^1.57.15",
+    "@tanstack/react-router": "^1.57.16",
+    "@tanstack/router-devtools": "^1.57.16",
     "@tanstack/router-plugin": "^1.57.15",
     "immer": "^10.1.1",
     "react": "^18.2.0",
diff --git a/examples/react/basic-default-search-params/package.json b/examples/react/basic-default-search-params/package.json
index 79f2e0de0..e05b528d6 100644
--- a/examples/react/basic-default-search-params/package.json
+++ b/examples/react/basic-default-search-params/package.json
@@ -10,8 +10,8 @@
   },
   "dependencies": {
     "@tanstack/react-query": "^5.56.2",
-    "@tanstack/react-router": "^1.57.15",
-    "@tanstack/router-devtools": "^1.57.15",
+    "@tanstack/react-router": "^1.57.16",
+    "@tanstack/router-devtools": "^1.57.16",
     "redaxios": "^0.5.1",
     "react": "^18.2.0",
     "react-dom": "^18.2.0",
diff --git a/examples/react/basic-file-based-codesplitting/package.json b/examples/react/basic-file-based-codesplitting/package.json
index 53249aefa..970b5278a 100644
--- a/examples/react/basic-file-based-codesplitting/package.json
+++ b/examples/react/basic-file-based-codesplitting/package.json
@@ -9,8 +9,8 @@
     "start": "vite"
   },
   "dependencies": {
-    "@tanstack/react-router": "^1.57.15",
-    "@tanstack/router-devtools": "^1.57.15",
+    "@tanstack/react-router": "^1.57.16",
+    "@tanstack/router-devtools": "^1.57.16",
     "@tanstack/router-plugin": "^1.57.15",
     "immer": "^10.1.1",
     "react": "^18.2.0",
diff --git a/examples/react/basic-file-based/package.json b/examples/react/basic-file-based/package.json
index ab3579104..1493e827c 100644
--- a/examples/react/basic-file-based/package.json
+++ b/examples/react/basic-file-based/package.json
@@ -10,8 +10,8 @@
     "test:e2e": "playwright test --project=chromium"
   },
   "dependencies": {
-    "@tanstack/react-router": "^1.57.15",
-    "@tanstack/router-devtools": "^1.57.15",
+    "@tanstack/react-router": "^1.57.16",
+    "@tanstack/router-devtools": "^1.57.16",
     "@tanstack/router-plugin": "^1.57.15",
     "immer": "^10.1.1",
     "react": "^18.2.0",
diff --git a/examples/react/basic-react-query-file-based/package.json b/examples/react/basic-react-query-file-based/package.json
index 64ad1632b..0185484c9 100644
--- a/examples/react/basic-react-query-file-based/package.json
+++ b/examples/react/basic-react-query-file-based/package.json
@@ -12,8 +12,8 @@
   "dependencies": {
     "@tanstack/react-query": "^5.56.2",
     "@tanstack/react-query-devtools": "^5.56.2",
-    "@tanstack/react-router": "^1.57.15",
-    "@tanstack/router-devtools": "^1.57.15",
+    "@tanstack/react-router": "^1.57.16",
+    "@tanstack/router-devtools": "^1.57.16",
     "@tanstack/router-plugin": "^1.57.15",
     "immer": "^10.1.1",
     "react": "^18.2.0",
diff --git a/examples/react/basic-react-query/package.json b/examples/react/basic-react-query/package.json
index cde4471ce..1d726f003 100644
--- a/examples/react/basic-react-query/package.json
+++ b/examples/react/basic-react-query/package.json
@@ -12,8 +12,8 @@
   "dependencies": {
     "@tanstack/react-query": "^5.56.2",
     "@tanstack/react-query-devtools": "^5.56.2",
-    "@tanstack/react-router": "^1.57.15",
-    "@tanstack/router-devtools": "^1.57.15",
+    "@tanstack/react-router": "^1.57.16",
+    "@tanstack/router-devtools": "^1.57.16",
     "react": "^18.2.0",
     "react-dom": "^18.2.0",
     "redaxios": "^0.5.1"
diff --git a/examples/react/basic-ssr-file-based/package.json b/examples/react/basic-ssr-file-based/package.json
index 00b2ed604..fb2ac4409 100644
--- a/examples/react/basic-ssr-file-based/package.json
+++ b/examples/react/basic-ssr-file-based/package.json
@@ -11,10 +11,10 @@
     "debug": "node --inspect-brk server"
   },
   "dependencies": {
-    "@tanstack/react-router": "^1.57.15",
-    "@tanstack/router-devtools": "^1.57.15",
+    "@tanstack/react-router": "^1.57.16",
+    "@tanstack/router-devtools": "^1.57.16",
     "@tanstack/router-plugin": "^1.57.15",
-    "@tanstack/start": "^1.57.15",
+    "@tanstack/start": "^1.57.16",
     "get-port": "^7.1.0",
     "react": "^18.2.0",
     "react-dom": "^18.2.0",
diff --git a/examples/react/basic-ssr-streaming-file-based/package.json b/examples/react/basic-ssr-streaming-file-based/package.json
index ae4c39362..dab59697a 100644
--- a/examples/react/basic-ssr-streaming-file-based/package.json
+++ b/examples/react/basic-ssr-streaming-file-based/package.json
@@ -11,10 +11,10 @@
     "debug": "node --inspect-brk server"
   },
   "dependencies": {
-    "@tanstack/react-router": "^1.57.15",
-    "@tanstack/router-devtools": "^1.57.15",
+    "@tanstack/react-router": "^1.57.16",
+    "@tanstack/router-devtools": "^1.57.16",
     "@tanstack/router-plugin": "^1.57.15",
-    "@tanstack/start": "^1.57.15",
+    "@tanstack/start": "^1.57.16",
     "get-port": "^7.1.0",
     "react": "^18.2.0",
     "react-dom": "^18.2.0",
diff --git a/examples/react/basic-virtual-file-based/package.json b/examples/react/basic-virtual-file-based/package.json
index 0d997fe7a..0d6ca4d1d 100644
--- a/examples/react/basic-virtual-file-based/package.json
+++ b/examples/react/basic-virtual-file-based/package.json
@@ -10,8 +10,8 @@
     "test:e2e": "playwright test --project=chromium"
   },
   "dependencies": {
-    "@tanstack/react-router": "^1.57.15",
-    "@tanstack/router-devtools": "^1.57.15",
+    "@tanstack/react-router": "^1.57.16",
+    "@tanstack/router-devtools": "^1.57.16",
     "@tanstack/router-plugin": "^1.57.15",
     "@tanstack/virtual-file-routes": "^1.56.0",
     "immer": "^10.1.1",
diff --git a/examples/react/basic-virtual-inside-file-based/package.json b/examples/react/basic-virtual-inside-file-based/package.json
index 466cf0e2f..492313fe4 100644
--- a/examples/react/basic-virtual-inside-file-based/package.json
+++ b/examples/react/basic-virtual-inside-file-based/package.json
@@ -9,8 +9,8 @@
     "start": "vite"
   },
   "dependencies": {
-    "@tanstack/react-router": "^1.57.15",
-    "@tanstack/router-devtools": "^1.57.15",
+    "@tanstack/react-router": "^1.57.16",
+    "@tanstack/router-devtools": "^1.57.16",
     "@tanstack/router-plugin": "^1.57.15",
     "@tanstack/virtual-file-routes": "^1.56.0",
     "immer": "^10.1.1",
diff --git a/examples/react/basic/package.json b/examples/react/basic/package.json
index 5679a9369..d823737e7 100644
--- a/examples/react/basic/package.json
+++ b/examples/react/basic/package.json
@@ -10,8 +10,8 @@
     "test:e2e": "playwright test --project=chromium"
   },
   "dependencies": {
-    "@tanstack/react-router": "^1.57.15",
-    "@tanstack/router-devtools": "^1.57.15",
+    "@tanstack/react-router": "^1.57.16",
+    "@tanstack/router-devtools": "^1.57.16",
     "react": "^18.2.0",
     "react-dom": "^18.2.0",
     "redaxios": "^0.5.1"
diff --git a/examples/react/deferred-data/package.json b/examples/react/deferred-data/package.json
index ba89c2869..78b6c96b2 100644
--- a/examples/react/deferred-data/package.json
+++ b/examples/react/deferred-data/package.json
@@ -9,8 +9,8 @@
     "start": "vite"
   },
   "dependencies": {
-    "@tanstack/react-router": "^1.57.15",
-    "@tanstack/router-devtools": "^1.57.15",
+    "@tanstack/react-router": "^1.57.16",
+    "@tanstack/router-devtools": "^1.57.16",
     "redaxios": "^0.5.1",
     "immer": "^10.1.1",
     "react": "^18.2.0",
diff --git a/examples/react/kitchen-sink-file-based/package.json b/examples/react/kitchen-sink-file-based/package.json
index 37e397dae..8eaf4f9ae 100644
--- a/examples/react/kitchen-sink-file-based/package.json
+++ b/examples/react/kitchen-sink-file-based/package.json
@@ -9,8 +9,8 @@
     "start": "vite"
   },
   "dependencies": {
-    "@tanstack/react-router": "^1.57.15",
-    "@tanstack/router-devtools": "^1.57.15",
+    "@tanstack/react-router": "^1.57.16",
+    "@tanstack/router-devtools": "^1.57.16",
     "@tanstack/router-plugin": "^1.57.15",
     "immer": "^10.1.1",
     "react": "^18.2.0",
diff --git a/examples/react/kitchen-sink-react-query-file-based/package.json b/examples/react/kitchen-sink-react-query-file-based/package.json
index c9bc6d3dc..a90175567 100644
--- a/examples/react/kitchen-sink-react-query-file-based/package.json
+++ b/examples/react/kitchen-sink-react-query-file-based/package.json
@@ -11,8 +11,8 @@
   "dependencies": {
     "@tanstack/react-query": "^5.56.2",
     "@tanstack/react-query-devtools": "^5.56.2",
-    "@tanstack/react-router": "^1.57.15",
-    "@tanstack/router-devtools": "^1.57.15",
+    "@tanstack/react-router": "^1.57.16",
+    "@tanstack/router-devtools": "^1.57.16",
     "@tanstack/router-plugin": "^1.57.15",
     "immer": "^10.1.1",
     "react": "^18.2.0",
diff --git a/examples/react/kitchen-sink-react-query/package.json b/examples/react/kitchen-sink-react-query/package.json
index 1c94826c1..6e847f097 100644
--- a/examples/react/kitchen-sink-react-query/package.json
+++ b/examples/react/kitchen-sink-react-query/package.json
@@ -11,8 +11,8 @@
   "dependencies": {
     "@tanstack/react-query": "^5.56.2",
     "@tanstack/react-query-devtools": "^5.56.2",
-    "@tanstack/react-router": "^1.57.15",
-    "@tanstack/router-devtools": "^1.57.15",
+    "@tanstack/react-router": "^1.57.16",
+    "@tanstack/router-devtools": "^1.57.16",
     "redaxios": "^0.5.1",
     "immer": "^10.1.1",
     "react": "^18.2.0",
diff --git a/examples/react/kitchen-sink/package.json b/examples/react/kitchen-sink/package.json
index 6baaa2b86..d8974da9b 100644
--- a/examples/react/kitchen-sink/package.json
+++ b/examples/react/kitchen-sink/package.json
@@ -9,8 +9,8 @@
     "start": "vite"
   },
   "dependencies": {
-    "@tanstack/react-router": "^1.57.15",
-    "@tanstack/router-devtools": "^1.57.15",
+    "@tanstack/react-router": "^1.57.16",
+    "@tanstack/router-devtools": "^1.57.16",
     "redaxios": "^0.5.1",
     "immer": "^10.1.1",
     "react": "^18.2.0",
diff --git a/examples/react/large-file-based/package.json b/examples/react/large-file-based/package.json
index 36a68cb71..6ca8b3a46 100644
--- a/examples/react/large-file-based/package.json
+++ b/examples/react/large-file-based/package.json
@@ -12,8 +12,8 @@
   },
   "dependencies": {
     "@tanstack/react-query": "^5.56.2",
-    "@tanstack/react-router": "^1.57.15",
-    "@tanstack/router-devtools": "^1.57.15",
+    "@tanstack/react-router": "^1.57.16",
+    "@tanstack/router-devtools": "^1.57.16",
     "@tanstack/router-plugin": "^1.57.15",
     "immer": "^10.1.1",
     "react": "^18.2.0",
diff --git a/examples/react/location-masking/package.json b/examples/react/location-masking/package.json
index faba8256e..b88afdaf2 100644
--- a/examples/react/location-masking/package.json
+++ b/examples/react/location-masking/package.json
@@ -11,8 +11,8 @@
   "dependencies": {
     "@radix-ui/react-dialog": "^1.1.1",
     "@tanstack/react-query": "^5.56.2",
-    "@tanstack/react-router": "^1.57.15",
-    "@tanstack/router-devtools": "^1.57.15",
+    "@tanstack/react-router": "^1.57.16",
+    "@tanstack/router-devtools": "^1.57.16",
     "redaxios": "^0.5.1",
     "react": "^18.2.0",
     "react-dom": "^18.2.0"
diff --git a/examples/react/navigation-blocking/package.json b/examples/react/navigation-blocking/package.json
index e2a7f6ca0..b19f543fe 100644
--- a/examples/react/navigation-blocking/package.json
+++ b/examples/react/navigation-blocking/package.json
@@ -10,8 +10,8 @@
   },
   "dependencies": {
     "@tanstack/react-query": "^5.56.2",
-    "@tanstack/react-router": "^1.57.15",
-    "@tanstack/router-devtools": "^1.57.15",
+    "@tanstack/react-router": "^1.57.16",
+    "@tanstack/router-devtools": "^1.57.16",
     "redaxios": "^0.5.1",
     "react": "^18.2.0",
     "react-dom": "^18.2.0"
diff --git a/examples/react/quickstart-file-based/package.json b/examples/react/quickstart-file-based/package.json
index 24f62effb..808b8b76d 100644
--- a/examples/react/quickstart-file-based/package.json
+++ b/examples/react/quickstart-file-based/package.json
@@ -9,8 +9,8 @@
     "start": "vite"
   },
   "dependencies": {
-    "@tanstack/react-router": "^1.57.15",
-    "@tanstack/router-devtools": "^1.57.15",
+    "@tanstack/react-router": "^1.57.16",
+    "@tanstack/router-devtools": "^1.57.16",
     "@tanstack/router-plugin": "^1.57.15",
     "immer": "^10.1.1",
     "react": "^18.2.0",
diff --git a/examples/react/quickstart-rspack-file-based/package.json b/examples/react/quickstart-rspack-file-based/package.json
index a90005063..5e87a1edc 100644
--- a/examples/react/quickstart-rspack-file-based/package.json
+++ b/examples/react/quickstart-rspack-file-based/package.json
@@ -8,8 +8,8 @@
     "preview": "rsbuild preview"
   },
   "dependencies": {
-    "@tanstack/react-router": "^1.57.15",
-    "@tanstack/router-devtools": "^1.57.15",
+    "@tanstack/react-router": "^1.57.16",
+    "@tanstack/router-devtools": "^1.57.16",
     "react": "^18.3.1",
     "react-dom": "^18.3.1"
   },
diff --git a/examples/react/quickstart-webpack-file-based/package.json b/examples/react/quickstart-webpack-file-based/package.json
index 3a678dd7d..2ee176c63 100644
--- a/examples/react/quickstart-webpack-file-based/package.json
+++ b/examples/react/quickstart-webpack-file-based/package.json
@@ -7,8 +7,8 @@
     "build": "webpack build && tsc --noEmit"
   },
   "dependencies": {
-    "@tanstack/react-router": "^1.57.15",
-    "@tanstack/router-devtools": "^1.57.15",
+    "@tanstack/react-router": "^1.57.16",
+    "@tanstack/router-devtools": "^1.57.16",
     "react": "^18.3.1",
     "react-dom": "^18.3.1"
   },
diff --git a/examples/react/quickstart/package.json b/examples/react/quickstart/package.json
index 4ca0a5a46..c79d5ea12 100644
--- a/examples/react/quickstart/package.json
+++ b/examples/react/quickstart/package.json
@@ -9,8 +9,8 @@
     "start": "vite"
   },
   "dependencies": {
-    "@tanstack/react-router": "^1.57.15",
-    "@tanstack/router-devtools": "^1.57.15",
+    "@tanstack/react-router": "^1.57.16",
+    "@tanstack/router-devtools": "^1.57.16",
     "react": "^18.2.0",
     "react-dom": "^18.2.0"
   },
diff --git a/examples/react/scroll-restoration/package.json b/examples/react/scroll-restoration/package.json
index 776d20491..fee12d354 100644
--- a/examples/react/scroll-restoration/package.json
+++ b/examples/react/scroll-restoration/package.json
@@ -9,9 +9,9 @@
     "start": "vite"
   },
   "dependencies": {
-    "@tanstack/react-router": "^1.57.15",
+    "@tanstack/react-router": "^1.57.16",
     "@tanstack/react-virtual": "^3.10.7",
-    "@tanstack/router-devtools": "^1.57.15",
+    "@tanstack/router-devtools": "^1.57.16",
     "react": "^18.2.0",
     "react-dom": "^18.2.0"
   },
diff --git a/examples/react/search-validator-adapters/package.json b/examples/react/search-validator-adapters/package.json
index 8c483970e..e560b8e39 100644
--- a/examples/react/search-validator-adapters/package.json
+++ b/examples/react/search-validator-adapters/package.json
@@ -9,12 +9,12 @@
     "start": "vite"
   },
   "dependencies": {
-    "@tanstack/react-router": "^1.57.15",
-    "@tanstack/router-devtools": "^1.57.15",
+    "@tanstack/react-router": "^1.57.16",
+    "@tanstack/router-devtools": "^1.57.16",
     "@tanstack/router-plugin": "^1.57.15",
-    "@tanstack/router-zod-adapter": "^1.57.15",
-    "@tanstack/router-valibot-adapter": "^1.57.15",
-    "@tanstack/router-arktype-adapter": "^1.57.15",
+    "@tanstack/router-zod-adapter": "^1.57.16",
+    "@tanstack/router-valibot-adapter": "^1.57.16",
+    "@tanstack/router-arktype-adapter": "^1.57.16",
     "@tanstack/react-query": "^5.56.2",
     "react": "^18.2.0",
     "react-dom": "^18.2.0",
diff --git a/examples/react/start-basic-auth/package.json b/examples/react/start-basic-auth/package.json
index d759c7af6..292deeef8 100644
--- a/examples/react/start-basic-auth/package.json
+++ b/examples/react/start-basic-auth/package.json
@@ -14,10 +14,10 @@
   },
   "dependencies": {
     "@prisma/client": "5.19.1",
-    "@tanstack/react-router": "^1.57.15",
-    "@tanstack/router-devtools": "^1.57.15",
+    "@tanstack/react-router": "^1.57.16",
+    "@tanstack/router-devtools": "^1.57.16",
     "@tanstack/router-plugin": "^1.57.15",
-    "@tanstack/start": "^1.57.15",
+    "@tanstack/start": "^1.57.16",
     "@vitejs/plugin-react": "^4.3.1",
     "dotenv": "^16.4.5",
     "isbot": "^5.1.17",
diff --git a/examples/react/start-basic-counter/package.json b/examples/react/start-basic-counter/package.json
index 085cf636a..a2068935b 100644
--- a/examples/react/start-basic-counter/package.json
+++ b/examples/react/start-basic-counter/package.json
@@ -11,8 +11,8 @@
     "format": "prettier --write '**/*' --ignore-unknown"
   },
   "dependencies": {
-    "@tanstack/react-router": "^1.57.15",
-    "@tanstack/start": "^1.57.15",
+    "@tanstack/react-router": "^1.57.16",
+    "@tanstack/start": "^1.57.16",
     "react": "^18.3.1",
     "react-dom": "^18.3.1",
     "vinxi": "0.4.3"
diff --git a/examples/react/start-basic-react-query/package.json b/examples/react/start-basic-react-query/package.json
index 337c6d9cd..d5a442219 100644
--- a/examples/react/start-basic-react-query/package.json
+++ b/examples/react/start-basic-react-query/package.json
@@ -14,11 +14,11 @@
   "dependencies": {
     "@tanstack/react-query": "^5.56.2",
     "@tanstack/react-query-devtools": "^5.56.2",
-    "@tanstack/react-router": "^1.57.15",
-    "@tanstack/react-router-with-query": "^1.57.15",
-    "@tanstack/router-devtools": "^1.57.15",
+    "@tanstack/react-router": "^1.57.16",
+    "@tanstack/react-router-with-query": "^1.57.16",
+    "@tanstack/router-devtools": "^1.57.16",
     "@tanstack/router-plugin": "^1.57.15",
-    "@tanstack/start": "^1.57.15",
+    "@tanstack/start": "^1.57.16",
     "@vitejs/plugin-react": "^4.3.1",
     "isbot": "^5.1.17",
     "react": "^18.3.1",
diff --git a/examples/react/start-basic-rsc/package.json b/examples/react/start-basic-rsc/package.json
index 2a62d7db1..3b9684420 100644
--- a/examples/react/start-basic-rsc/package.json
+++ b/examples/react/start-basic-rsc/package.json
@@ -12,10 +12,10 @@
   },
   "dependencies": {
     "@babel/plugin-syntax-typescript": "^7.25.4",
-    "@tanstack/react-router": "^1.57.15",
-    "@tanstack/router-devtools": "^1.57.15",
+    "@tanstack/react-router": "^1.57.16",
+    "@tanstack/router-devtools": "^1.57.16",
     "@tanstack/router-plugin": "^1.57.15",
-    "@tanstack/start": "^1.57.15",
+    "@tanstack/start": "^1.57.16",
     "redaxios": "^0.5.1",
     "tailwind-merge": "^2.5.2",
     "vinxi": "0.4.3"
diff --git a/examples/react/start-basic/package.json b/examples/react/start-basic/package.json
index 89483f286..a805373a9 100644
--- a/examples/react/start-basic/package.json
+++ b/examples/react/start-basic/package.json
@@ -12,10 +12,10 @@
     "test:e2e": "playwright test --project=chromium"
   },
   "dependencies": {
-    "@tanstack/react-router": "^1.57.15",
-    "@tanstack/router-devtools": "^1.57.15",
+    "@tanstack/react-router": "^1.57.16",
+    "@tanstack/router-devtools": "^1.57.16",
     "@tanstack/router-plugin": "^1.57.15",
-    "@tanstack/start": "^1.57.15",
+    "@tanstack/start": "^1.57.16",
     "@vitejs/plugin-react": "^4.3.1",
     "isbot": "^5.1.17",
     "react": "^18.3.1",
diff --git a/examples/react/start-clerk-basic/package.json b/examples/react/start-clerk-basic/package.json
index aa208cac9..8289b9e09 100644
--- a/examples/react/start-clerk-basic/package.json
+++ b/examples/react/start-clerk-basic/package.json
@@ -13,10 +13,10 @@
   },
   "dependencies": {
     "@clerk/tanstack-start": "0.4.1",
-    "@tanstack/react-router": "^1.57.15",
-    "@tanstack/router-devtools": "^1.57.15",
+    "@tanstack/react-router": "^1.57.16",
+    "@tanstack/router-devtools": "^1.57.16",
     "@tanstack/router-plugin": "^1.57.15",
-    "@tanstack/start": "^1.57.15",
+    "@tanstack/start": "^1.57.16",
     "@vitejs/plugin-react": "^4.3.1",
     "dotenv": "^16.4.5",
     "isbot": "^5.1.17",
diff --git a/examples/react/start-convex-trellaux/package.json b/examples/react/start-convex-trellaux/package.json
index 7c8ecb86f..0c5c65707 100644
--- a/examples/react/start-convex-trellaux/package.json
+++ b/examples/react/start-convex-trellaux/package.json
@@ -15,11 +15,11 @@
   "dependencies": {
     "@tanstack/react-query": "^5.56.2",
     "@tanstack/react-query-devtools": "^5.56.2",
-    "@tanstack/react-router": "^1.57.15",
-    "@tanstack/react-router-with-query": "^1.57.15",
-    "@tanstack/router-devtools": "^1.57.15",
+    "@tanstack/react-router": "^1.57.16",
+    "@tanstack/react-router-with-query": "^1.57.16",
+    "@tanstack/router-devtools": "^1.57.16",
     "@tanstack/router-plugin": "^1.57.15",
-    "@tanstack/start": "^1.57.15",
+    "@tanstack/start": "^1.57.16",
     "@vitejs/plugin-react": "^4.3.1",
     "@convex-dev/react-query": "0.0.0-alpha.5",
     "concurrently": "^8.2.2",
diff --git a/examples/react/start-supabase-basic/package.json b/examples/react/start-supabase-basic/package.json
index f180b3455..03218c79c 100644
--- a/examples/react/start-supabase-basic/package.json
+++ b/examples/react/start-supabase-basic/package.json
@@ -15,10 +15,10 @@
   "dependencies": {
     "@supabase/ssr": "^0.5.1",
     "@supabase/supabase-js": "^2.45.4",
-    "@tanstack/react-router": "^1.57.15",
+    "@tanstack/react-router": "^1.57.16",
     "@tanstack/router-plugin": "^1.57.15",
-    "@tanstack/router-devtools": "^1.57.15",
-    "@tanstack/start": "^1.57.15",
+    "@tanstack/router-devtools": "^1.57.16",
+    "@tanstack/start": "^1.57.16",
     "@vitejs/plugin-react": "^4.3.1",
     "react": "^18.3.1",
     "react-dom": "^18.3.1",
diff --git a/examples/react/start-trellaux/package.json b/examples/react/start-trellaux/package.json
index 82144c789..4934e17dd 100644
--- a/examples/react/start-trellaux/package.json
+++ b/examples/react/start-trellaux/package.json
@@ -13,11 +13,11 @@
   "dependencies": {
     "@tanstack/react-query": "^5.56.2",
     "@tanstack/react-query-devtools": "^5.56.2",
-    "@tanstack/react-router": "^1.57.15",
-    "@tanstack/react-router-with-query": "^1.57.15",
-    "@tanstack/router-devtools": "^1.57.15",
+    "@tanstack/react-router": "^1.57.16",
+    "@tanstack/react-router-with-query": "^1.57.16",
+    "@tanstack/router-devtools": "^1.57.16",
     "@tanstack/router-plugin": "^1.57.15",
-    "@tanstack/start": "^1.57.15",
+    "@tanstack/start": "^1.57.16",
     "@vitejs/plugin-react": "^4.3.1",
     "isbot": "^5.1.17",
     "ky": "^1.7.2",
diff --git a/examples/react/with-framer-motion/package.json b/examples/react/with-framer-motion/package.json
index 480d5f7b0..359943a79 100644
--- a/examples/react/with-framer-motion/package.json
+++ b/examples/react/with-framer-motion/package.json
@@ -9,8 +9,8 @@
     "start": "vite"
   },
   "dependencies": {
-    "@tanstack/react-router": "^1.57.15",
-    "@tanstack/router-devtools": "^1.57.15",
+    "@tanstack/react-router": "^1.57.16",
+    "@tanstack/router-devtools": "^1.57.16",
     "redaxios": "^0.5.1",
     "framer-motion": "^11.5.4",
     "immer": "^10.1.1",
diff --git a/examples/react/with-trpc-react-query/package.json b/examples/react/with-trpc-react-query/package.json
index c85238b82..0403a5016 100644
--- a/examples/react/with-trpc-react-query/package.json
+++ b/examples/react/with-trpc-react-query/package.json
@@ -10,8 +10,8 @@
   "dependencies": {
     "@tanstack/react-query": "^5.56.2",
     "@tanstack/react-query-devtools": "^5.56.2",
-    "@tanstack/react-router": "^1.57.15",
-    "@tanstack/router-devtools": "^1.57.15",
+    "@tanstack/react-router": "^1.57.16",
+    "@tanstack/router-devtools": "^1.57.16",
     "@tanstack/router-plugin": "^1.57.15",
     "@trpc/client": "11.0.0-rc.502",
     "@trpc/react-query": "11.0.0-rc.502",
diff --git a/examples/react/with-trpc/package.json b/examples/react/with-trpc/package.json
index b0e6e15fe..a58e93040 100644
--- a/examples/react/with-trpc/package.json
+++ b/examples/react/with-trpc/package.json
@@ -8,8 +8,8 @@
     "start": "vinxi start"
   },
   "dependencies": {
-    "@tanstack/react-router": "^1.57.15",
-    "@tanstack/router-devtools": "^1.57.15",
+    "@tanstack/react-router": "^1.57.16",
+    "@tanstack/router-devtools": "^1.57.16",
     "@tanstack/router-plugin": "^1.57.15",
     "@trpc/client": "11.0.0-rc.502",
     "@trpc/server": "11.0.0-rc.502",
diff --git a/packages/create-router/package.json b/packages/create-router/package.json
index e5b3e6baf..2d983011d 100644
--- a/packages/create-router/package.json
+++ b/packages/create-router/package.json
@@ -1,6 +1,6 @@
 {
   "name": "@tanstack/create-router",
-  "version": "1.57.15",
+  "version": "1.57.16",
   "description": "Modern and scalable routing for React applications",
   "author": "Tanner Linsley",
   "license": "MIT",
diff --git a/packages/react-router-with-query/package.json b/packages/react-router-with-query/package.json
index 36476c106..e564471a3 100644
--- a/packages/react-router-with-query/package.json
+++ b/packages/react-router-with-query/package.json
@@ -1,6 +1,6 @@
 {
   "name": "@tanstack/react-router-with-query",
-  "version": "1.57.15",
+  "version": "1.57.16",
   "description": "Modern and scalable routing for React applications",
   "author": "Tanner Linsley",
   "license": "MIT",
diff --git a/packages/react-router/package.json b/packages/react-router/package.json
index 3317b9ace..e4998cffc 100644
--- a/packages/react-router/package.json
+++ b/packages/react-router/package.json
@@ -1,6 +1,6 @@
 {
   "name": "@tanstack/react-router",
-  "version": "1.57.15",
+  "version": "1.57.16",
   "description": "Modern and scalable routing for React applications",
   "author": "Tanner Linsley",
   "license": "MIT",
@@ -84,7 +84,7 @@
     "@tanstack/router-generator": "workspace:*"
   },
   "peerDependenciesMeta": {
-    "@tanstack/react-generator": {
+    "@tanstack/router-generator": {
       "optional": true
     }
   }
diff --git a/packages/react-router/src/route.ts b/packages/react-router/src/route.ts
index 9bd0f6ac7..225d9e45b 100644
--- a/packages/react-router/src/route.ts
+++ b/packages/react-router/src/route.ts
@@ -750,37 +750,21 @@ export type RouteConstraints = {
   TRouteTree: AnyRoute
 }
 
+export type RouteTypesById<
+  TRouter extends RegisteredRouter,
+  TId extends RouteIds<TRouter['routeTree']>,
+> = RouteById<TRouter['routeTree'], TId>['types']
+
 export function getRouteApi<
-  TId extends RouteIds<RegisteredRouter['routeTree']>,
-  TRouter extends AnyRouter = RegisteredRouter,
-  TRoute extends AnyRoute = RouteById<TRouter['routeTree'], TId>,
-  TFullSearchSchema = TRoute['types']['fullSearchSchema'],
-  TAllParams = TRoute['types']['allParams'],
-  TAllContext = TRoute['types']['allContext'],
-  TLoaderDeps = TRoute['types']['loaderDeps'],
-  TLoaderData = TRoute['types']['loaderData'],
+  TRouter extends RegisteredRouter,
+  TId extends RouteIds<TRouter['routeTree']>,
 >(id: TId) {
-  return new RouteApi<
-    TId,
-    TRouter,
-    TRoute,
-    TFullSearchSchema,
-    TAllParams,
-    TAllContext,
-    TLoaderDeps,
-    TLoaderData
-  >({ id })
+  return new RouteApi<TRouter, TId>({ id })
 }
 
 export class RouteApi<
-  TId extends RouteIds<RegisteredRouter['routeTree']>,
-  TRouter extends AnyRouter = RegisteredRouter,
-  TRoute extends AnyRoute = RouteById<TRouter['routeTree'], TId>,
-  TFullSearchSchema = TRoute['types']['fullSearchSchema'],
-  TAllParams = TRoute['types']['allParams'],
-  TAllContext = TRoute['types']['allContext'],
-  TLoaderDeps = TRoute['types']['loaderDeps'],
-  TLoaderData = TRoute['types']['loaderData'],
+  TRouter extends RegisteredRouter,
+  TId extends RouteIds<TRouter['routeTree']>,
 > {
   id: TId
 
@@ -801,8 +785,12 @@ export class RouteApi<
     return useMatch({ select: opts?.select, from: this.id })
   }
 
-  useRouteContext = <TSelected = Expand<TAllContext>>(opts?: {
-    select?: (s: Expand<TAllContext>) => TSelected
+  useRouteContext = <
+    TSelected = Expand<RouteTypesById<TRouter, TId>['allContext']>,
+  >(opts?: {
+    select?: (
+      s: Expand<RouteTypesById<TRouter, TId>['allContext']>,
+    ) => TSelected
   }): TSelected => {
     return useMatch({
       from: this.id,
@@ -810,32 +798,44 @@ export class RouteApi<
     })
   }
 
-  useSearch = <TSelected = Expand<TFullSearchSchema>>(opts?: {
-    select?: (s: Expand<TFullSearchSchema>) => TSelected
+  useSearch = <
+    TSelected = Expand<RouteTypesById<TRouter, TId>['fullSearchSchema']>,
+  >(opts?: {
+    select?: (
+      s: Expand<RouteTypesById<TRouter, TId>['fullSearchSchema']>,
+    ) => TSelected
   }): TSelected => {
     return useSearch({ ...opts, from: this.id })
   }
 
-  useParams = <TSelected = Expand<TAllParams>>(opts?: {
-    select?: (s: Expand<TAllParams>) => TSelected
+  useParams = <
+    TSelected = Expand<RouteTypesById<TRouter, TId>['allParams']>,
+  >(opts?: {
+    select?: (s: Expand<RouteTypesById<TRouter, TId>['allParams']>) => TSelected
   }): TSelected => {
     return useParams({ ...opts, from: this.id })
   }
 
-  useLoaderDeps = <TSelected = TLoaderDeps>(opts?: {
-    select?: (s: TLoaderDeps) => TSelected
+  useLoaderDeps = <
+    TSelected = RouteTypesById<TRouter, TId>['loaderDeps'],
+  >(opts?: {
+    select?: (s: RouteTypesById<TRouter, TId>['loaderDeps']) => TSelected
   }): TSelected => {
     return useLoaderDeps({ ...opts, from: this.id, strict: false } as any)
   }
 
-  useLoaderData = <TSelected = TLoaderData>(opts?: {
-    select?: (s: TLoaderData) => TSelected
+  useLoaderData = <
+    TSelected = RouteTypesById<TRouter, TId>['loaderData'],
+  >(opts?: {
+    select?: (s: RouteTypesById<TRouter, TId>['loaderData']) => TSelected
   }): TSelected => {
     return useLoaderData({ ...opts, from: this.id, strict: false } as any)
   }
 
-  useNavigate = (): UseNavigateResult<TRoute['fullPath']> => {
-    return useNavigate({ from: this.id })
+  useNavigate = (): UseNavigateResult<
+    RouteTypesById<TRouter, TId>['fullPath']
+  > => {
+    return useNavigate({ from: this.id as string })
   }
 
   notFound = (opts?: NotFoundError) => {
diff --git a/packages/router-arktype-adapter/package.json b/packages/router-arktype-adapter/package.json
index 5a58b06e0..0a2824759 100644
--- a/packages/router-arktype-adapter/package.json
+++ b/packages/router-arktype-adapter/package.json
@@ -1,6 +1,6 @@
 {
   "name": "@tanstack/router-arktype-adapter",
-  "version": "1.57.15",
+  "version": "1.57.16",
   "description": "Modern and scalable routing for React applications",
   "author": "Tanner Linsley",
   "license": "MIT",
diff --git a/packages/router-devtools/package.json b/packages/router-devtools/package.json
index a2d009b7b..af97d4ef9 100644
--- a/packages/router-devtools/package.json
+++ b/packages/router-devtools/package.json
@@ -1,6 +1,6 @@
 {
   "name": "@tanstack/router-devtools",
-  "version": "1.57.15",
+  "version": "1.57.16",
   "description": "Modern and scalable routing for React applications",
   "author": "Tanner Linsley",
   "license": "MIT",
diff --git a/packages/router-valibot-adapter/package.json b/packages/router-valibot-adapter/package.json
index c16d0a74e..27ebf60a8 100644
--- a/packages/router-valibot-adapter/package.json
+++ b/packages/router-valibot-adapter/package.json
@@ -1,6 +1,6 @@
 {
   "name": "@tanstack/router-valibot-adapter",
-  "version": "1.57.15",
+  "version": "1.57.16",
   "description": "Modern and scalable routing for React applications",
   "author": "Tanner Linsley",
   "license": "MIT",
diff --git a/packages/router-zod-adapter/package.json b/packages/router-zod-adapter/package.json
index 847fc67bd..28d8cbc66 100644
--- a/packages/router-zod-adapter/package.json
+++ b/packages/router-zod-adapter/package.json
@@ -1,6 +1,6 @@
 {
   "name": "@tanstack/router-zod-adapter",
-  "version": "1.57.15",
+  "version": "1.57.16",
   "description": "Modern and scalable routing for React applications",
   "author": "Tanner Linsley",
   "license": "MIT",
diff --git a/packages/start/package.json b/packages/start/package.json
index c6b06622a..094f47a0a 100644
--- a/packages/start/package.json
+++ b/packages/start/package.json
@@ -1,6 +1,6 @@
 {
   "name": "@tanstack/start",
-  "version": "1.57.15",
+  "version": "1.57.16",
   "description": "Modern and scalable routing for React applications",
   "author": "Tanner Linsley",
   "license": "MIT",


Test patch:
diff --git a/packages/react-router/tests/routeApi.test-d.tsx b/packages/react-router/tests/routeApi.test-d.tsx
index 927cd6a53..467bfb726 100644
--- a/packages/react-router/tests/routeApi.test-d.tsx
+++ b/packages/react-router/tests/routeApi.test-d.tsx
@@ -1,6 +1,6 @@
 import { describe, expectTypeOf, test } from 'vitest'
 import { createRootRoute, createRoute, createRouter, getRouteApi } from '../src'
-import type { UseNavigateResult } from '../src'
+import type { MakeRouteMatch, UseNavigateResult } from '../src'
 
 const rootRoute = createRootRoute()
 
@@ -23,6 +23,9 @@ const invoiceRoute = createRoute({
   getParentRoute: () => invoicesRoute,
   path: '$invoiceId',
   validateSearch: () => ({ page: 0 }),
+  beforeLoad: () => ({ beforeLoadContext: 0 }),
+  loaderDeps: () => ({ dep: 0 }),
+  loader: () => ({ data: 0 }),
 })
 
 const routeTree = rootRoute.addChildren([
@@ -40,7 +43,7 @@ type ExtractDefaultFrom<T> =
   T extends UseNavigateResult<infer DefaultFrom> ? DefaultFrom : never
 
 describe('getRouteApi', () => {
-  const invoiceRouteApi = getRouteApi<'/invoices/$invoiceId', DefaultRouter>(
+  const invoiceRouteApi = getRouteApi<DefaultRouter, '/invoices/$invoiceId'>(
     '/invoices/$invoiceId',
   )
   describe('useNavigate', () => {
@@ -52,6 +55,36 @@ describe('getRouteApi', () => {
       >().toEqualTypeOf<'/invoices/$invoiceId'>()
     })
   })
+  test('useParams', () => {
+    expectTypeOf(invoiceRouteApi.useParams()).toEqualTypeOf<{
+      invoiceId: string
+    }>()
+  })
+  test('useContext', () => {
+    expectTypeOf(invoiceRouteApi.useRouteContext()).toEqualTypeOf<{
+      beforeLoadContext: number
+    }>()
+  })
+  test('useSearch', () => {
+    expectTypeOf(invoiceRouteApi.useSearch()).toEqualTypeOf<{
+      page: number
+    }>()
+  })
+  test('useLoaderData', () => {
+    expectTypeOf(invoiceRouteApi.useLoaderData()).toEqualTypeOf<{
+      data: number
+    }>()
+  })
+  test('useLoaderDeps', () => {
+    expectTypeOf(invoiceRouteApi.useLoaderDeps()).toEqualTypeOf<{
+      dep: number
+    }>()
+  })
+  test('useMatch', () => {
+    expectTypeOf(invoiceRouteApi.useMatch()).toEqualTypeOf<
+      MakeRouteMatch<typeof routeTree, '/invoices/$invoiceId'>
+    >()
+  })
 })
 
 describe('createRoute', () => {