Repository: TanStack/router
Pull request #2246 (2024-09-02 08:46:21)

docs(start): fix tsconfig
with module `Preserve`:
![image](https://github.com/user-attachments/assets/a2ebf42a-cf61-4cd2-91c1-865c0d502ed1)

with module `ESNext`:
![image](https://github.com/user-attachments/assets/b11cbd61-3fe8-4fb9-be3b-99f411918012)


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

CI is running for commit e9161c0da0b1c5e3866aafc96013362db84697af.

[📂 Click to track the progress, see the status, the terminal output, and the build insights.](https://cloud.nx.app/cipes/66d57b74e32ea63eddc858b2?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/9c155b41-7b54-448e-b43f-a5f3472b7b89)
<details><summary><b>More templates</b></summary><p>

- [tanstack-router-react-example-authenticated-routes](https://pkg.pr.new/template/2164cef8-153d-4b80-9fc8-8b69e7bd2522)
- [tanstack-router-react-example-basic](https://pkg.pr.new/template/e26010f0-7429-40c0-8db8-ed1d28bb97c6)
- [tanstack-router-react-example-basic-default-search-params](https://pkg.pr.new/template/a22a1cad-64b9-44dd-bbed-835f61a0ea0d)
- [tanstack-router-react-example-basic-file-based](https://pkg.pr.new/template/f21500a6-e69b-4011-acb2-b5418cf5a0cb)
- [tanstack-router-react-example-basic-file-based-codesplitting](https://pkg.pr.new/template/8929f55c-d88f-48e2-82ea-3d9852c660cd)
- [tanstack-router-react-example-react-query](https://pkg.pr.new/template/12262655-eea1-4185-a94d-5721638b2ebc)
- [tanstack-router-react-example-basic-react-query-file-based](https://pkg.pr.new/template/bd512125-1267-44ee-92f3-214c0ac202c0)
- [tanstack-router-react-example-basic-ssr-file-based](https://pkg.pr.new/template/ffa70306-208d-4ff5-89ba-3f7959aa842c)
- [tanstack-router-react-example-basic-ssr-streaming-file-based](https://pkg.pr.new/template/2170f5e5-cce2-4def-b678-ff0832847b2b)
- [tanstack-router-react-example-deferred-data](https://pkg.pr.new/template/d9c5b93f-cae4-4e71-a8de-32853ac716c1)
- [tanstack-router-react-example-kitchen-sink](https://pkg.pr.new/template/32338347-ee20-4d18-be66-b0b990c14a32)
- [tanstack-router-react-example-kitchen-sink-file-based](https://pkg.pr.new/template/0098c01a-d795-4ae9-9889-65b63370e216)
- [tanstack-router-react-example-kitchen-sink-react-query](https://pkg.pr.new/template/8a96bba9-163b-42f4-9aaf-0f0889021d72)
- [tanstack-router-react-example-kitchen-sink-react-query-file-based](https://pkg.pr.new/template/1fb1ce08-1371-4de4-b779-d211d8c58047)
- [tanstack-router-react-example-large-file-based](https://pkg.pr.new/template/f92eefd8-9502-43d1-b22f-c7c473b63c58)
- [tanstack-router-react-example-location-masking](https://pkg.pr.new/template/6cd00fa3-a89b-424f-a196-7557e4b324bf)
- [tanstack-router-react-example-navigation-blocking](https://pkg.pr.new/template/a2ee70bf-3210-491b-b518-50a969114d38)
- [tanstack-router-react-example-quickstart](https://pkg.pr.new/template/b424c6fe-0a68-4338-9fb0-aef8b97db584)
- [tanstack-router-react-example-quickstart-file-based](https://pkg.pr.new/template/3d4f66cb-ad3e-410e-abc2-5dc6e329fcf9)
- [tanstack-router-react-example-quickstart-rspack-file-based](https://pkg.pr.new/template/34fa8c9a-d90d-4a0b-81e0-f9e53b97c7bd)
- [tanstack-router-react-example-quickstart-webpack-file-based](https://pkg.pr.new/template/672f7813-cc1b-493f-a770-b7db41cca1c6)
- [tanstack-router-react-example-scroll-restoration](https://pkg.pr.new/template/6348328b-43f6-4a19-9783-d04e8238bd6b)
- [tanstack-router-search-validator-adapters](https://pkg.pr.new/template/ac79bd21-41eb-49a9-8bae-9acae85caa3c)
- [tanstack-router-example-react-start-basic](https://pkg.pr.new/template/52ac8774-f080-448b-9beb-34853f6e066f)
- [tanstack-router-example-react-start-basic-auth](https://pkg.pr.new/template/a19369b8-a305-468c-ba48-6885b8a2fbed)
- [tanstack-router-example-react-start-basic-counter](https://pkg.pr.new/template/c362f306-ed30-4ac2-aa2b-a84ac2858e1f)
- [tanstack-router-example-react-start-basic-react-query](https://pkg.pr.new/template/f001373d-8121-4865-9dbc-172463549558)
- [tanstack-router-example-react-start-basic-rsc](https://pkg.pr.new/template/bb697880-24fc-4a6c-9d2b-f05ed5377c89)
- [tanstack-router-example-react-start-clerk-basic](https://pkg.pr.new/template/7277641f-ce0c-4556-8a26-7e8018cb6c20)
- [tanstack-router-example-react-start-trello-trellaux](https://pkg.pr.new/template/4928fe58-a862-4ac2-a565-b139110d6274)
- [tanstack-router-example-react-start-trellaux](https://pkg.pr.new/template/e7eb4e70-5d86-4088-8be9-86adf48d60ce)
- [tanstack-router-react-example-with-framer-motion](https://pkg.pr.new/template/73916a7b-21bd-4a20-b821-2ecec9ed6fb0)
- [tanstack-router-react-example-with-trpc](https://pkg.pr.new/template/e9e266d7-67b4-4b6e-8bb3-21a95fffe072)
- [tanstack-router-react-example-with-trpc-react-query](https://pkg.pr.new/template/039e4a4c-5bea-44f7-b4c7-d62b8558487e)

</p></details>
      
    


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

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

</p></details>
      
    

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

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

</p></details>
      
    

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

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

</p></details>
      
    

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

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

</p></details>
      
    

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

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

</p></details>
      
    

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

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

</p></details>
      
    

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

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

</p></details>
      
    

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

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

</p></details>
      
    

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

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

</p></details>
      
    

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

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

</p></details>
      
    

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

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

</p></details>
      
    

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

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

</p></details>
      
    

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

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

</p></details>
      
    

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

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

</p></details>
      
    

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


Patch:
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({