Repository: TanStack/router
Pull request #2249 (2024-09-02 12:37:11)

docs(react): fix broken links in route-trees.md and routing-concepts.md
This PR fixes broken hyperlinks in `docs/framework/react/guide/route-trees.md` and `docs/framework/react/guide/routing-concepts.md`.

- `route-trees.md`: route tree examples no longer exist in this page, so the hyperlinks should point to the full documentation for each route type. ([page link](https://tanstack.com/router/latest/docs/framework/react/guide/route-trees#route-tree-configuration))
- `routing-concepts.md`: there is a typo that leads to a 404 page. ([page link](https://tanstack.com/router/latest/docs/framework/react/guide/routing-concepts))

leeluca: I've opened a separate PR #2250 to remove a reference to the no longer existing route tree examples in `route-trees.md`. I'll be happy to combine them if they are considered to be of same scope.
nx-cloud[bot]: # ☁️ Nx Cloud Report

CI is running for commit edb4940a3e8038f243dfe7ed00a759e452c82e6a.

[📂 Click to track the progress, see the status, the terminal output, and the build insights.](https://cloud.nx.app/cipes/66d5e6b7ba0c54241eeb2d6c?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/04d1432f-ac75-42f1-b35e-114cacc292e8)
<details><summary><b>More templates</b></summary><p>

- [tanstack-router-react-example-authenticated-routes](https://pkg.pr.new/template/fed6e14f-99f2-4b4a-824e-b90887cacbbc)
- [tanstack-router-react-example-basic](https://pkg.pr.new/template/bef4bc65-0f53-4b23-bbcc-8a30f56f4102)
- [tanstack-router-react-example-basic-default-search-params](https://pkg.pr.new/template/7e19e24f-95ab-43ce-b78d-8cc67e0ede17)
- [tanstack-router-react-example-basic-file-based](https://pkg.pr.new/template/36ddec14-88b9-4921-9a28-febe99014083)
- [tanstack-router-react-example-basic-file-based-codesplitting](https://pkg.pr.new/template/e42e716b-abfd-4677-bd7e-80b5fea4f56b)
- [tanstack-router-react-example-react-query](https://pkg.pr.new/template/6bf934ac-0cc9-4f75-b0b9-cd8faef8f0e0)
- [tanstack-router-react-example-basic-react-query-file-based](https://pkg.pr.new/template/8db633c9-73c7-41e2-a59f-06c85b704bac)
- [tanstack-router-react-example-basic-ssr-file-based](https://pkg.pr.new/template/790df61c-33af-42a6-be00-5492d773e5eb)
- [tanstack-router-react-example-basic-ssr-streaming-file-based](https://pkg.pr.new/template/31ba5db8-7da3-404e-8fdb-ca51fb6fc76b)
- [tanstack-router-react-example-deferred-data](https://pkg.pr.new/template/c3b5e5bb-4dcb-4467-a5fb-3eae2ae6b11c)
- [tanstack-router-react-example-kitchen-sink](https://pkg.pr.new/template/4c59ff30-0f65-45ef-8cab-85ff5437f98a)
- [tanstack-router-react-example-kitchen-sink-file-based](https://pkg.pr.new/template/e85d8efa-dcce-4fba-83c3-0b1c5336725d)
- [tanstack-router-react-example-kitchen-sink-react-query](https://pkg.pr.new/template/2fc3c58c-1b6a-4712-86f2-f939296f7beb)
- [tanstack-router-react-example-kitchen-sink-react-query-file-based](https://pkg.pr.new/template/be712347-acd6-44f9-874a-35f85e5411f5)
- [tanstack-router-react-example-large-file-based](https://pkg.pr.new/template/661b5647-d8f8-4774-9e94-56da3d026fd7)
- [tanstack-router-react-example-location-masking](https://pkg.pr.new/template/e4e2d806-12ef-4d52-bd10-09b034ddbc3b)
- [tanstack-router-react-example-navigation-blocking](https://pkg.pr.new/template/c80b7328-c94b-4623-a113-a4557c8fc955)
- [tanstack-router-react-example-quickstart](https://pkg.pr.new/template/6a217d72-b47f-4d5e-a000-892b5dab400f)
- [tanstack-router-react-example-quickstart-file-based](https://pkg.pr.new/template/1eb228b2-5c04-4f05-bf56-ba7e711f3938)
- [tanstack-router-react-example-quickstart-rspack-file-based](https://pkg.pr.new/template/328795f8-828f-4df7-bd6f-f0f46038730d)
- [tanstack-router-react-example-quickstart-webpack-file-based](https://pkg.pr.new/template/15a61b46-39af-4241-aef2-a69592d0180a)
- [tanstack-router-react-example-scroll-restoration](https://pkg.pr.new/template/45c1e199-bb6f-4ae4-a5a7-1087db8f0f62)
- [tanstack-router-search-validator-adapters](https://pkg.pr.new/template/8f773f94-b2a3-4d1d-a9e2-62750f1f9825)
- [tanstack-router-example-react-start-basic](https://pkg.pr.new/template/b5c2b3df-3a91-4a3e-9c31-c14caf83345f)
- [tanstack-router-example-react-start-basic-auth](https://pkg.pr.new/template/f9dd028b-2414-4c66-9edd-ac0f43d2225e)
- [tanstack-router-example-react-start-basic-counter](https://pkg.pr.new/template/f128042e-7251-4e73-877c-5fbb7c07a40e)
- [tanstack-router-example-react-start-basic-react-query](https://pkg.pr.new/template/7ab87dbc-d3bd-46c7-91b5-bb6e13dea5f0)
- [tanstack-router-example-react-start-basic-rsc](https://pkg.pr.new/template/13e30a36-5d9d-416e-8e62-188e08408e90)
- [tanstack-router-example-react-start-trello-trellaux](https://pkg.pr.new/template/2ef65304-8c39-406e-a0ed-3101ffc6440e)
- [tanstack-router-example-react-start-clerk-basic](https://pkg.pr.new/template/cbf5a855-f704-43b7-8b3c-20b0f66adebd)
- [tanstack-router-example-react-start-trellaux](https://pkg.pr.new/template/c7a3f034-f9de-4bee-bbc3-c76a2ba92def)
- [tanstack-router-react-example-with-framer-motion](https://pkg.pr.new/template/07cf4dab-675e-4fdc-8f71-2c57a442a39e)
- [tanstack-router-react-example-with-trpc](https://pkg.pr.new/template/02d82a53-0c3f-4661-838c-1cb09cf53eb7)
- [tanstack-router-react-example-with-trpc-react-query](https://pkg.pr.new/template/2cab52c9-caef-46e7-b57a-c8f6fd8b7078)

</p></details>
      
    


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

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

</p></details>
      
    

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

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

</p></details>
      
    

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

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

</p></details>
      
    

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

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

</p></details>
      
    

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

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

</p></details>
      
    

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

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

</p></details>
      
    

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

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

</p></details>
      
    

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

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

</p></details>
      
    

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

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

</p></details>
      
    

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

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

</p></details>
      
    

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

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

</p></details>
      
    

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

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

</p></details>
      
    

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

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

</p></details>
      
    

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

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

</p></details>
      
    

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


Patch:
diff --git a/docs/framework/react/guide/route-trees.md b/docs/framework/react/guide/route-trees.md
index 85d2c0e7d..8958500ee 100644
--- a/docs/framework/react/guide/route-trees.md
+++ b/docs/framework/react/guide/route-trees.md
@@ -61,9 +61,9 @@ The above is a valid route tree configuration that can be used with TanStack Rou
 
 Route trees can be configured using a few different ways:
 
-- [Flat Routes](./route-trees.md#flat-routes)
-- [Directories](./route-trees.md#directory-routes)
-- [Mixed Flat Routes and Directories](./route-trees.md#mixed-flat-and-directory-routes)
-- [Code-Based Routes](./route-trees.md#code-based-routes)
+- [Flat Routes](./file-based-routing#flat-routes)
+- [Directories](./file-based-routing#directory-routes)
+- [Mixed Flat Routes and Directories](./file-based-routing#mixed-flat-and-directory-routes)
+- [Code-Based Routes](./code-based-routing)
 
 For a birds-eye view, the route tree examples below showcase the [Routing Concepts](./routing-concepts.md) that are available in TanStack Router, but please be sure to check out the full documentation links above for each type of route tree, or just proceed to the next section to get started with file-based routing.
diff --git a/docs/framework/react/guide/routing-concepts.md b/docs/framework/react/guide/routing-concepts.md
index cafa3d5e4..b3febed35 100644
--- a/docs/framework/react/guide/routing-concepts.md
+++ b/docs/framework/react/guide/routing-concepts.md
@@ -8,7 +8,7 @@ TanStack Router supports a number of powerful routing concepts that allow you to
 - [Static Routes](./routing-concepts.md#static-routes)
 - [Index Routes](./routing-concepts.md#index-routes)
 - [Dynamic Route Segments](./routing-concepts.md#dynamic-route-segments)
-- [Splat / Catch-All Routes](./routing-concept.md#splat--catch-all-routes)
+- [Splat / Catch-All Routes](./routing-concepts.md#splat--catch-all-routes)
 - [Pathless Routes](./routing-concepts.md#pathless--layout-routes)
 - [Non-Nested Routes](./routing-concepts.md#non-nested-routes)
 - [Not-Found Routes](./routing-concepts.md#404--notfoundroutes)
diff --git a/docs/framework/react/start/getting-started.md b/docs/framework/react/start/getting-started.md
index 8b9acae24..240e6b2fa 100644
--- a/docs/framework/react/start/getting-started.md
+++ b/docs/framework/react/start/getting-started.md
@@ -32,7 +32,7 @@ Create a `tsconfig.json` file with at least the following settings:
   "compilerOptions": {
     "jsx": "react-jsx",
     "moduleResolution": "Bundler",
-    "module": "Preserve",
+    "module": "ESNext",
     "target": "ES2022",
     "skipLibCheck": true,
   },
diff --git a/examples/react/authenticated-routes/package.json b/examples/react/authenticated-routes/package.json
index 67a45212b..7b81c77f3 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.52.3",
-    "@tanstack/router-devtools": "^1.52.3",
+    "@tanstack/react-router": "^1.52.4",
+    "@tanstack/router-devtools": "^1.52.4",
     "@tanstack/router-plugin": "^1.52.0",
     "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 1f60d824c..b6ec2c0a6 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.51.21",
-    "@tanstack/react-router": "^1.52.3",
-    "@tanstack/router-devtools": "^1.52.3",
+    "@tanstack/react-router": "^1.52.4",
+    "@tanstack/router-devtools": "^1.52.4",
     "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 0fcf5465e..11c21f5f2 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.52.3",
-    "@tanstack/router-devtools": "^1.52.3",
+    "@tanstack/react-router": "^1.52.4",
+    "@tanstack/router-devtools": "^1.52.4",
     "@tanstack/router-plugin": "^1.52.0",
     "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 7fa7fd3fe..8be70d214 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.52.3",
-    "@tanstack/router-devtools": "^1.52.3",
+    "@tanstack/react-router": "^1.52.4",
+    "@tanstack/router-devtools": "^1.52.4",
     "@tanstack/router-plugin": "^1.52.0",
     "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 5fed43c5a..a7cdb071d 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.51.21",
     "@tanstack/react-query-devtools": "^5.51.21",
-    "@tanstack/react-router": "^1.52.3",
-    "@tanstack/router-devtools": "^1.52.3",
+    "@tanstack/react-router": "^1.52.4",
+    "@tanstack/router-devtools": "^1.52.4",
     "@tanstack/router-plugin": "^1.52.0",
     "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 fde99974c..afc0513b0 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.51.21",
     "@tanstack/react-query-devtools": "^5.51.21",
-    "@tanstack/react-router": "^1.52.3",
-    "@tanstack/router-devtools": "^1.52.3",
+    "@tanstack/react-router": "^1.52.4",
+    "@tanstack/router-devtools": "^1.52.4",
     "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 a60cc66a9..7c05b3342 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.52.3",
-    "@tanstack/router-devtools": "^1.52.3",
+    "@tanstack/react-router": "^1.52.4",
+    "@tanstack/router-devtools": "^1.52.4",
     "@tanstack/router-plugin": "^1.52.0",
-    "@tanstack/start": "^1.52.3",
+    "@tanstack/start": "^1.52.4",
     "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 c4dd02d06..7e1798192 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.52.3",
-    "@tanstack/router-devtools": "^1.52.3",
+    "@tanstack/react-router": "^1.52.4",
+    "@tanstack/router-devtools": "^1.52.4",
     "@tanstack/router-plugin": "^1.52.0",
-    "@tanstack/start": "^1.52.3",
+    "@tanstack/start": "^1.52.4",
     "get-port": "^7.1.0",
     "react": "^18.2.0",
     "react-dom": "^18.2.0",
diff --git a/examples/react/basic/package.json b/examples/react/basic/package.json
index 963ba87f5..3d42b884b 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.52.3",
-    "@tanstack/router-devtools": "^1.52.3",
+    "@tanstack/react-router": "^1.52.4",
+    "@tanstack/router-devtools": "^1.52.4",
     "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 11181b0d1..5e51819f4 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.52.3",
-    "@tanstack/router-devtools": "^1.52.3",
+    "@tanstack/react-router": "^1.52.4",
+    "@tanstack/router-devtools": "^1.52.4",
     "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 d090299e7..48d3241b8 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.52.3",
-    "@tanstack/router-devtools": "^1.52.3",
+    "@tanstack/react-router": "^1.52.4",
+    "@tanstack/router-devtools": "^1.52.4",
     "@tanstack/router-plugin": "^1.52.0",
     "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 f7f19cb9c..5e52f1fcb 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.51.21",
     "@tanstack/react-query-devtools": "^5.51.21",
-    "@tanstack/react-router": "^1.52.3",
-    "@tanstack/router-devtools": "^1.52.3",
+    "@tanstack/react-router": "^1.52.4",
+    "@tanstack/router-devtools": "^1.52.4",
     "@tanstack/router-plugin": "^1.52.0",
     "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 879f64ef0..52e7ba7b5 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.51.21",
     "@tanstack/react-query-devtools": "^5.51.21",
-    "@tanstack/react-router": "^1.52.3",
-    "@tanstack/router-devtools": "^1.52.3",
+    "@tanstack/react-router": "^1.52.4",
+    "@tanstack/router-devtools": "^1.52.4",
     "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 3f7df7a31..3f82bc0f5 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.52.3",
-    "@tanstack/router-devtools": "^1.52.3",
+    "@tanstack/react-router": "^1.52.4",
+    "@tanstack/router-devtools": "^1.52.4",
     "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 a3e6954c9..171c224d0 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.51.21",
-    "@tanstack/react-router": "^1.52.3",
-    "@tanstack/router-devtools": "^1.52.3",
+    "@tanstack/react-router": "^1.52.4",
+    "@tanstack/router-devtools": "^1.52.4",
     "@tanstack/router-plugin": "^1.52.0",
     "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 ba5cf21a2..507c7be21 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.51.21",
-    "@tanstack/react-router": "^1.52.3",
-    "@tanstack/router-devtools": "^1.52.3",
+    "@tanstack/react-router": "^1.52.4",
+    "@tanstack/router-devtools": "^1.52.4",
     "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 8627ea50a..5b8c08cb3 100644
--- a/examples/react/navigation-blocking/package.json
+++ b/examples/react/navigation-blocking/package.json
@@ -10,8 +10,8 @@
   },
   "dependencies": {
     "@tanstack/react-query": "^5.51.21",
-    "@tanstack/react-router": "^1.52.3",
-    "@tanstack/router-devtools": "^1.52.3",
+    "@tanstack/react-router": "^1.52.4",
+    "@tanstack/router-devtools": "^1.52.4",
     "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 03fdc131f..965356684 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.52.3",
-    "@tanstack/router-devtools": "^1.52.3",
+    "@tanstack/react-router": "^1.52.4",
+    "@tanstack/router-devtools": "^1.52.4",
     "@tanstack/router-plugin": "^1.52.0",
     "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 4e5a3aee2..c597ce714 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.52.3",
-    "@tanstack/router-devtools": "^1.52.3",
+    "@tanstack/react-router": "^1.52.4",
+    "@tanstack/router-devtools": "^1.52.4",
     "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 6449b2123..77c7166eb 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"
   },
   "dependencies": {
-    "@tanstack/react-router": "^1.52.3",
-    "@tanstack/router-devtools": "^1.52.3",
+    "@tanstack/react-router": "^1.52.4",
+    "@tanstack/router-devtools": "^1.52.4",
     "react": "^18.3.1",
     "react-dom": "^18.3.1"
   },
diff --git a/examples/react/quickstart/package.json b/examples/react/quickstart/package.json
index fbc7e7014..976ea2262 100644
--- a/examples/react/quickstart/package.json
+++ b/examples/react/quickstart/package.json
@@ -9,8 +9,8 @@
     "start": "vite"
   },
   "dependencies": {
-    "@tanstack/react-router": "^1.52.3",
-    "@tanstack/router-devtools": "^1.52.3",
+    "@tanstack/react-router": "^1.52.4",
+    "@tanstack/router-devtools": "^1.52.4",
     "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 b2460093a..3a9f33d72 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.52.3",
+    "@tanstack/react-router": "^1.52.4",
     "@tanstack/react-virtual": "^3.8.4",
-    "@tanstack/router-devtools": "^1.52.3",
+    "@tanstack/router-devtools": "^1.52.4",
     "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 c9b4df1d4..054773fd7 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.52.3",
-    "@tanstack/router-devtools": "^1.52.3",
+    "@tanstack/react-router": "^1.52.4",
+    "@tanstack/router-devtools": "^1.52.4",
     "@tanstack/router-plugin": "^1.52.0",
-    "@tanstack/router-zod-adapter": "^1.52.3",
-    "@tanstack/router-valibot-adapter": "^1.52.3",
-    "@tanstack/router-arktype-adapter": "^1.52.3",
+    "@tanstack/router-zod-adapter": "^1.52.4",
+    "@tanstack/router-valibot-adapter": "^1.52.4",
+    "@tanstack/router-arktype-adapter": "^1.52.4",
     "@tanstack/react-query": "^5.51.21",
     "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 6717aeda9..4f05f20a0 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.17.0",
-    "@tanstack/react-router": "^1.52.3",
-    "@tanstack/router-devtools": "^1.52.3",
+    "@tanstack/react-router": "^1.52.4",
+    "@tanstack/router-devtools": "^1.52.4",
     "@tanstack/router-plugin": "^1.52.0",
-    "@tanstack/start": "^1.52.3",
+    "@tanstack/start": "^1.52.4",
     "@vitejs/plugin-react": "^4.3.1",
     "dotenv": "^16.4.5",
     "isbot": "^5.1.12",
diff --git a/examples/react/start-basic-counter/package.json b/examples/react/start-basic-counter/package.json
index 42f685130..b6ffc2a46 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.52.3",
-    "@tanstack/start": "^1.52.3",
+    "@tanstack/react-router": "^1.52.4",
+    "@tanstack/start": "^1.52.4",
     "react": "^18.3.1",
     "react-dom": "^18.3.1",
     "vinxi": "0.4.2"
diff --git a/examples/react/start-basic-react-query/package.json b/examples/react/start-basic-react-query/package.json
index 43b8677a8..3f8328c64 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.51.21",
     "@tanstack/react-query-devtools": "^5.51.21",
-    "@tanstack/react-router": "^1.52.3",
-    "@tanstack/react-router-with-query": "^1.52.3",
-    "@tanstack/router-devtools": "^1.52.3",
+    "@tanstack/react-router": "^1.52.4",
+    "@tanstack/react-router-with-query": "^1.52.4",
+    "@tanstack/router-devtools": "^1.52.4",
     "@tanstack/router-plugin": "^1.52.0",
-    "@tanstack/start": "^1.52.3",
+    "@tanstack/start": "^1.52.4",
     "@vitejs/plugin-react": "^4.3.1",
     "isbot": "^5.1.14",
     "react": "^18.3.1",
diff --git a/examples/react/start-basic-rsc/package.json b/examples/react/start-basic-rsc/package.json
index 7df94f148..feff4695a 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.24.7",
-    "@tanstack/react-router": "^1.52.3",
-    "@tanstack/router-devtools": "^1.52.3",
+    "@tanstack/react-router": "^1.52.4",
+    "@tanstack/router-devtools": "^1.52.4",
     "@tanstack/router-plugin": "^1.52.0",
-    "@tanstack/start": "^1.52.3",
+    "@tanstack/start": "^1.52.4",
     "redaxios": "^0.5.1",
     "tailwind-merge": "^2.5.2",
     "vinxi": "0.4.2"
diff --git a/examples/react/start-basic/package.json b/examples/react/start-basic/package.json
index 6e630518a..f2f7def99 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.52.3",
-    "@tanstack/router-devtools": "^1.52.3",
+    "@tanstack/react-router": "^1.52.4",
+    "@tanstack/router-devtools": "^1.52.4",
     "@tanstack/router-plugin": "^1.52.0",
-    "@tanstack/start": "^1.52.3",
+    "@tanstack/start": "^1.52.4",
     "@vitejs/plugin-react": "^4.3.1",
     "isbot": "^5.1.14",
     "react": "^18.3.1",
diff --git a/examples/react/start-clerk-basic/package.json b/examples/react/start-clerk-basic/package.json
index cbed6a941..646140da5 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.3.0-snapshot.vdf04997",
-    "@tanstack/react-router": "^1.52.3",
-    "@tanstack/router-devtools": "^1.52.3",
+    "@tanstack/react-router": "^1.52.4",
+    "@tanstack/router-devtools": "^1.52.4",
     "@tanstack/router-plugin": "^1.52.0",
-    "@tanstack/start": "^1.52.3",
+    "@tanstack/start": "^1.52.4",
     "@vitejs/plugin-react": "^4.3.1",
     "dotenv": "^16.4.5",
     "isbot": "^5.1.12",
diff --git a/examples/react/start-convex-trellaux/package.json b/examples/react/start-convex-trellaux/package.json
index df3fb1873..08850f574 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.51.21",
     "@tanstack/react-query-devtools": "^5.51.21",
-    "@tanstack/react-router": "^1.52.3",
-    "@tanstack/react-router-with-query": "^1.52.3",
-    "@tanstack/router-devtools": "^1.52.3",
+    "@tanstack/react-router": "^1.52.4",
+    "@tanstack/react-router-with-query": "^1.52.4",
+    "@tanstack/router-devtools": "^1.52.4",
     "@tanstack/router-plugin": "^1.52.0",
-    "@tanstack/start": "^1.52.3",
+    "@tanstack/start": "^1.52.4",
     "@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-trellaux/package.json b/examples/react/start-trellaux/package.json
index d91cef99a..2c017a27b 100644
--- a/examples/react/start-trellaux/package.json
+++ b/examples/react/start-trellaux/package.json
@@ -13,11 +13,11 @@
   "dependencies": {
     "@tanstack/react-query": "^5.51.21",
     "@tanstack/react-query-devtools": "^5.51.21",
-    "@tanstack/react-router": "^1.52.3",
-    "@tanstack/react-router-with-query": "^1.52.3",
-    "@tanstack/router-devtools": "^1.52.3",
+    "@tanstack/react-router": "^1.52.4",
+    "@tanstack/react-router-with-query": "^1.52.4",
+    "@tanstack/router-devtools": "^1.52.4",
     "@tanstack/router-plugin": "^1.52.0",
-    "@tanstack/start": "^1.52.3",
+    "@tanstack/start": "^1.52.4",
     "@vitejs/plugin-react": "^4.3.1",
     "isbot": "^5.1.14",
     "ky": "^1.5.0",
diff --git a/examples/react/with-framer-motion/package.json b/examples/react/with-framer-motion/package.json
index 2078468f9..7ffb146d2 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.52.3",
-    "@tanstack/router-devtools": "^1.52.3",
+    "@tanstack/react-router": "^1.52.4",
+    "@tanstack/router-devtools": "^1.52.4",
     "redaxios": "^0.5.1",
     "framer-motion": "^11.3.21",
     "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 593435a07..610f76784 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.51.21",
     "@tanstack/react-query-devtools": "^5.51.21",
-    "@tanstack/react-router": "^1.52.3",
-    "@tanstack/router-devtools": "^1.52.3",
+    "@tanstack/react-router": "^1.52.4",
+    "@tanstack/router-devtools": "^1.52.4",
     "@tanstack/router-plugin": "^1.52.0",
     "@trpc/client": "11.0.0-rc.477",
     "@trpc/react-query": "11.0.0-rc.477",
diff --git a/examples/react/with-trpc/package.json b/examples/react/with-trpc/package.json
index ed933a1fd..8310d367c 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.52.3",
-    "@tanstack/router-devtools": "^1.52.3",
+    "@tanstack/react-router": "^1.52.4",
+    "@tanstack/router-devtools": "^1.52.4",
     "@tanstack/router-plugin": "^1.52.0",
     "@trpc/client": "11.0.0-rc.477",
     "@trpc/server": "11.0.0-rc.477",
diff --git a/packages/react-router-with-query/package.json b/packages/react-router-with-query/package.json
index cc9bf65f7..1d14b9b18 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.52.3",
+  "version": "1.52.4",
   "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 3cb54e854..e2d0fef8b 100644
--- a/packages/react-router/package.json
+++ b/packages/react-router/package.json
@@ -1,6 +1,6 @@
 {
   "name": "@tanstack/react-router",
-  "version": "1.52.3",
+  "version": "1.52.4",
   "description": "Modern and scalable routing for React applications",
   "author": "Tanner Linsley",
   "license": "MIT",
diff --git a/packages/react-router/src/router.ts b/packages/react-router/src/router.ts
index cb07523e9..ff26c3bcb 100644
--- a/packages/react-router/src/router.ts
+++ b/packages/react-router/src/router.ts
@@ -1643,11 +1643,6 @@ export class Router<
   load = async (): Promise<void> => {
     this.latestLocation = this.parseLocation(this.latestLocation)
 
-    this.__store.setState((s) => ({
-      ...s,
-      loadedAt: Date.now(),
-    }))
-
     let redirect: ResolvedRedirect | undefined
     let notFound: NotFoundError | undefined
 
@@ -1738,6 +1733,7 @@ export class Router<
                     return {
                       ...s,
                       isLoading: false,
+                      loadedAt: Date.now(),
                       matches: newMatches,
                       pendingMatches: undefined,
                       cachedMatches: [
diff --git a/packages/router-arktype-adapter/package.json b/packages/router-arktype-adapter/package.json
index 4177cb19d..377e077cb 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.52.3",
+  "version": "1.52.4",
   "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 7b09bd35c..c03aa5470 100644
--- a/packages/router-devtools/package.json
+++ b/packages/router-devtools/package.json
@@ -1,6 +1,6 @@
 {
   "name": "@tanstack/router-devtools",
-  "version": "1.52.3",
+  "version": "1.52.4",
   "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 fbf9874f3..91efab3ad 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.52.3",
+  "version": "1.52.4",
   "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 0f9bd1379..5b2d24d31 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.52.3",
+  "version": "1.52.4",
   "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 7f060fcd3..5ba6a0a90 100644
--- a/packages/start/package.json
+++ b/packages/start/package.json
@@ -1,6 +1,6 @@
 {
   "name": "@tanstack/start",
-  "version": "1.52.3",
+  "version": "1.52.4",
   "description": "Modern and scalable routing for React applications",
   "author": "Tanner Linsley",
   "license": "MIT",


Test patch:
diff --git a/packages/react-router/tests/link.test.tsx b/packages/react-router/tests/link.test.tsx
index 9bf54202b..07a47d109 100644
--- a/packages/react-router/tests/link.test.tsx
+++ b/packages/react-router/tests/link.test.tsx
@@ -760,6 +760,77 @@ describe('Link', () => {
     expect(onError).toHaveBeenCalledOnce()
   })
 
+  test('when navigating away from a route with a loader that errors', async () => {
+    const postsOnError = vi.fn()
+    const indexOnError = vi.fn()
+    const rootRoute = createRootRoute({
+      component: () => (
+        <>
+          <div>
+            <Link to="/">Index</Link> <Link to="/posts">Posts</Link>
+          </div>
+          <hr />
+          <Outlet />
+        </>
+      ),
+    })
+    const indexRoute = createRoute({
+      getParentRoute: () => rootRoute,
+      path: '/',
+      component: () => {
+        return (
+          <>
+            <h1>Index</h1>
+          </>
+        )
+      },
+      onError: indexOnError,
+      errorComponent: () => <span>IndexError</span>,
+    })
+
+    const error = new Error('Something went wrong!')
+
+    const postsRoute = createRoute({
+      getParentRoute: () => rootRoute,
+      path: 'posts',
+      loaderDeps: (opts) => ({ page: opts.search }),
+      loader: () => {
+        throw error
+      },
+      onError: postsOnError,
+      errorComponent: () => <span>PostsError</span>,
+      component: () => {
+        return (
+          <>
+            <h1>Posts</h1>
+          </>
+        )
+      },
+    })
+
+    const router = createRouter({
+      routeTree: rootRoute.addChildren([indexRoute, postsRoute]),
+    })
+
+    render(<RouterProvider router={router} />)
+
+    const postsLink = await screen.findByRole('link', { name: 'Posts' })
+
+    fireEvent.click(postsLink)
+
+    const postsErrorText = await screen.findByText('PostsError')
+    expect(postsErrorText).toBeInTheDocument()
+
+    expect(postsOnError).toHaveBeenCalledOnce()
+    expect(postsOnError).toHaveBeenCalledWith(error)
+
+    const indexLink = await screen.findByRole('link', { name: 'Index' })
+    fireEvent.click(indexLink)
+
+    expect(screen.findByText('IndexError')).rejects.toThrow()
+    expect(indexOnError).not.toHaveBeenCalledOnce()
+  })
+
   test('when navigating to /posts with a beforeLoad that redirects', async () => {
     const rootRoute = createRootRoute()
     const indexRoute = createRoute({