docs(router): fix preloading option name to defaultPreloadGcTime#7230
docs(router): fix preloading option name to defaultPreloadGcTime#7230pavan-sh wants to merge 1 commit intoTanStack:mainfrom
Conversation
📝 WalkthroughWalkthroughUpdated documentation for preload route garbage collection configuration, renaming the option from Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
|
View your CI Pipeline Execution ↗ for commit 2fb5b17
☁️ Nx Cloud last updated this comment at |
There was a problem hiding this comment.
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
📒 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. |
There was a problem hiding this comment.
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.
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