Skip to content

docs(router): fix preloading option name to defaultPreloadGcTime#7230

Open
pavan-sh wants to merge 1 commit intoTanStack:mainfrom
pavan-sh:docs/fix-preload-gc-option
Open

docs(router): fix preloading option name to defaultPreloadGcTime#7230
pavan-sh wants to merge 1 commit intoTanStack:mainfrom
pavan-sh:docs/fix-preload-gc-option

Conversation

@pavan-sh
Copy link
Copy Markdown
Contributor

@pavan-sh pavan-sh commented Apr 20, 2026

Updates docs/router/guide/preloading.md to use the correct router option name.

defaultPreloadMaxAge -> defaultPreloadGcTime

Ref:
https://github.com/TanStack/router/blob/main/packages/router-core/src/router.ts#L264
https://github.com/TanStack/router/blob/main/packages/router-core/src/router.ts#L258
https://github.com/TanStack/router/blob/main/packages/router-core/src/router.ts#L2778

Summary by CodeRabbit

  • Documentation
    • Updated preloading guide documentation to reflect changes in configuration options for route match cleanup timing.

@github-actions github-actions Bot added the documentation Everything documentation related label Apr 20, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 20, 2026

📝 Walkthrough

Walkthrough

Updated documentation for preload route garbage collection configuration, renaming the option from defaultPreloadMaxAge to defaultPreloadGcTime while maintaining the existing default behavior of removing unused preloaded routes after 30 seconds.

Changes

Cohort / File(s) Summary
Documentation Update
docs/router/guide/preloading.md
Configuration option renamed from defaultPreloadMaxAge to defaultPreloadGcTime for preload route match garbage collection timing.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐰 The names change, but the magic stays,
Thirty seconds to clear the haze,
From MaxAge to GcTime it flows,
Cleaner docs where clarity grows! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: correcting a documentation reference from an outdated option name (defaultPreloadMaxAge) to the correct current option name (defaultPreloadGcTime).
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@nx-cloud
Copy link
Copy Markdown
Contributor

nx-cloud Bot commented Apr 20, 2026

View your CI Pipeline Execution ↗ for commit 2fb5b17

Command Status Duration Result
nx affected --targets=test:eslint,test:unit,tes... ✅ Succeeded <1s View ↗
nx run-many --target=build --exclude=examples/*... ✅ Succeeded 3s View ↗

☁️ Nx Cloud last updated this comment at 2026-04-20 03:07:00 UTC

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Apr 20, 2026

More templates

@tanstack/arktype-adapter

npm i https://pkg.pr.new/@tanstack/arktype-adapter@7230

@tanstack/eslint-plugin-router

npm i https://pkg.pr.new/@tanstack/eslint-plugin-router@7230

@tanstack/eslint-plugin-start

npm i https://pkg.pr.new/@tanstack/eslint-plugin-start@7230

@tanstack/history

npm i https://pkg.pr.new/@tanstack/history@7230

@tanstack/nitro-v2-vite-plugin

npm i https://pkg.pr.new/@tanstack/nitro-v2-vite-plugin@7230

@tanstack/react-router

npm i https://pkg.pr.new/@tanstack/react-router@7230

@tanstack/react-router-devtools

npm i https://pkg.pr.new/@tanstack/react-router-devtools@7230

@tanstack/react-router-ssr-query

npm i https://pkg.pr.new/@tanstack/react-router-ssr-query@7230

@tanstack/react-start

npm i https://pkg.pr.new/@tanstack/react-start@7230

@tanstack/react-start-client

npm i https://pkg.pr.new/@tanstack/react-start-client@7230

@tanstack/react-start-rsc

npm i https://pkg.pr.new/@tanstack/react-start-rsc@7230

@tanstack/react-start-server

npm i https://pkg.pr.new/@tanstack/react-start-server@7230

@tanstack/router-cli

npm i https://pkg.pr.new/@tanstack/router-cli@7230

@tanstack/router-core

npm i https://pkg.pr.new/@tanstack/router-core@7230

@tanstack/router-devtools

npm i https://pkg.pr.new/@tanstack/router-devtools@7230

@tanstack/router-devtools-core

npm i https://pkg.pr.new/@tanstack/router-devtools-core@7230

@tanstack/router-generator

npm i https://pkg.pr.new/@tanstack/router-generator@7230

@tanstack/router-plugin

npm i https://pkg.pr.new/@tanstack/router-plugin@7230

@tanstack/router-ssr-query-core

npm i https://pkg.pr.new/@tanstack/router-ssr-query-core@7230

@tanstack/router-utils

npm i https://pkg.pr.new/@tanstack/router-utils@7230

@tanstack/router-vite-plugin

npm i https://pkg.pr.new/@tanstack/router-vite-plugin@7230

@tanstack/solid-router

npm i https://pkg.pr.new/@tanstack/solid-router@7230

@tanstack/solid-router-devtools

npm i https://pkg.pr.new/@tanstack/solid-router-devtools@7230

@tanstack/solid-router-ssr-query

npm i https://pkg.pr.new/@tanstack/solid-router-ssr-query@7230

@tanstack/solid-start

npm i https://pkg.pr.new/@tanstack/solid-start@7230

@tanstack/solid-start-client

npm i https://pkg.pr.new/@tanstack/solid-start-client@7230

@tanstack/solid-start-server

npm i https://pkg.pr.new/@tanstack/solid-start-server@7230

@tanstack/start-client-core

npm i https://pkg.pr.new/@tanstack/start-client-core@7230

@tanstack/start-fn-stubs

npm i https://pkg.pr.new/@tanstack/start-fn-stubs@7230

@tanstack/start-plugin-core

npm i https://pkg.pr.new/@tanstack/start-plugin-core@7230

@tanstack/start-server-core

npm i https://pkg.pr.new/@tanstack/start-server-core@7230

@tanstack/start-static-server-functions

npm i https://pkg.pr.new/@tanstack/start-static-server-functions@7230

@tanstack/start-storage-context

npm i https://pkg.pr.new/@tanstack/start-storage-context@7230

@tanstack/valibot-adapter

npm i https://pkg.pr.new/@tanstack/valibot-adapter@7230

@tanstack/virtual-file-routes

npm i https://pkg.pr.new/@tanstack/virtual-file-routes@7230

@tanstack/vue-router

npm i https://pkg.pr.new/@tanstack/vue-router@7230

@tanstack/vue-router-devtools

npm i https://pkg.pr.new/@tanstack/vue-router-devtools@7230

@tanstack/vue-router-ssr-query

npm i https://pkg.pr.new/@tanstack/vue-router-ssr-query@7230

@tanstack/vue-start

npm i https://pkg.pr.new/@tanstack/vue-start@7230

@tanstack/vue-start-client

npm i https://pkg.pr.new/@tanstack/vue-start-client@7230

@tanstack/vue-start-server

npm i https://pkg.pr.new/@tanstack/vue-start-server@7230

@tanstack/zod-adapter

npm i https://pkg.pr.new/@tanstack/zod-adapter@7230

commit: 2fb5b17

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/router/guide/preloading.md`:
- Line 23: The doc text incorrectly states "30 seconds" for preloaded data GC;
update the sentence to "30 minutes" to match the router core
defaultPreloadGcTime value (1_800_000), ensuring the docs and the
defaultPreloadGcTime constant/setting are consistent and the explanatory
sentence mentions "30 minutes (defaultPreloadGcTime = 1_800_000)" or equivalent
phrasing.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 0e698e79-b8ee-4ea2-82d0-9d545815ef96

📥 Commits

Reviewing files that changed from the base of the PR and between cbf9ecf and 2fb5b17.

📒 Files selected for processing (1)
  • docs/router/guide/preloading.md

Preloaded route matches are temporarily cached in memory with a few important caveats:

- **Unused preloaded data is removed after 30 seconds by default.** This can be configured by setting the `defaultPreloadMaxAge` option on your router.
- **Unused preloaded data is removed after 30 seconds by default.** This can be configured by setting the `defaultPreloadGcTime` option on your router.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Default duration appears incorrect (30s vs 30m)

Line 23 says preloaded data is removed after 30 seconds by default, but defaultPreloadGcTime is documented in router core as 1_800_000 (30 minutes). Please update this value to avoid misleading users.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/router/guide/preloading.md` at line 23, The doc text incorrectly states
"30 seconds" for preloaded data GC; update the sentence to "30 minutes" to match
the router core defaultPreloadGcTime value (1_800_000), ensuring the docs and
the defaultPreloadGcTime constant/setting are consistent and the explanatory
sentence mentions "30 minutes (defaultPreloadGcTime = 1_800_000)" or equivalent
phrasing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Everything documentation related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant