Skip to content

Conversation

@turansky
Copy link
Contributor

@turansky turansky commented Jan 3, 2026

Summary by CodeRabbit

Release Notes

  • Documentation
    • Updated routing configuration API: Property name changed from path to params in type options.

✏️ Tip: You can customize this high-level summary in your review settings.

@github-actions github-actions bot added the documentation Everything documentation related label Jan 3, 2026
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 3, 2026

📝 Walkthrough

Walkthrough

A documentation field in the PathParamOptions type was renamed from path to params in the ToOptionsType API reference, preserving the underlying type signature while updating the public API naming.

Changes

Cohort / File(s) Summary
API Documentation
docs/router/framework/react/api/router/ToOptionsType.md
Renamed PathParamOptions field from path to params with type true | Record<string, TPathParam> | ((prev: TFromParams) => TToParams)

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Suggested labels

documentation

Poem

🐰 A field once named "path" takes flight,
Now "params" shines clear and bright!
The API docs dance in the sun,
With renames both simple and fun! ✨

Pre-merge checks

✅ 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 clearly summarizes the main change: fixing a property name in React router documentation by renaming 'path' to 'params' in PathParamOptions type.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

📜 Recent review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 038d0dc and 0e20c8c.

📒 Files selected for processing (1)
  • docs/router/framework/react/api/router/ToOptionsType.md
🧰 Additional context used
📓 Path-based instructions (1)
docs/**/*.{md,mdx}

📄 CodeRabbit inference engine (AGENTS.md)

Use relative links to docs/ folder format (e.g., ./guide/data-loading) for internal documentation references

Files:

  • docs/router/framework/react/api/router/ToOptionsType.md
🧠 Learnings (3)
📓 Common learnings
Learnt from: nlynzaad
Repo: TanStack/router PR: 5182
File: e2e/react-router/basic-file-based/src/routes/non-nested/named/$baz_.bar.tsx:3-5
Timestamp: 2025-09-22T00:56:49.237Z
Learning: In TanStack Router, underscores are intentionally stripped from route segments (e.g., `$baz_` becomes `baz` in generated types) but should be preserved in base path segments. This is the correct behavior as of the fix in PR #5182.
Learnt from: schiller-manuel
Repo: TanStack/router PR: 6120
File: packages/router-generator/src/generator.ts:654-657
Timestamp: 2025-12-17T02:17:55.086Z
Learning: In `packages/router-generator/src/generator.ts`, pathless_layout routes must receive a `path` property when they have a `cleanedPath`, even though they are non-path routes. This is necessary because child routes inherit the path from their parent, and without this property, child routes would not have the correct full path at runtime.
Learnt from: nlynzaad
Repo: TanStack/router PR: 5182
File: e2e/react-router/basic-file-based/tests/non-nested-paths.spec.ts:167-172
Timestamp: 2025-09-22T00:56:53.426Z
Learning: In TanStack Router, underscores are intentionally stripped from route segments during path parsing, but preserved in base path segments. This is the expected behavior implemented in PR #5182.
📚 Learning: 2025-12-17T02:17:55.086Z
Learnt from: schiller-manuel
Repo: TanStack/router PR: 6120
File: packages/router-generator/src/generator.ts:654-657
Timestamp: 2025-12-17T02:17:55.086Z
Learning: In `packages/router-generator/src/generator.ts`, pathless_layout routes must receive a `path` property when they have a `cleanedPath`, even though they are non-path routes. This is necessary because child routes inherit the path from their parent, and without this property, child routes would not have the correct full path at runtime.

Applied to files:

  • docs/router/framework/react/api/router/ToOptionsType.md
📚 Learning: 2025-12-06T15:03:07.223Z
Learnt from: CR
Repo: TanStack/router PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-06T15:03:07.223Z
Learning: Implement type-safe routing with search params and path params

Applied to files:

  • docs/router/framework/react/api/router/ToOptionsType.md
🔇 Additional comments (1)
docs/router/framework/react/api/router/ToOptionsType.md (1)

21-23: The documentation update correctly reflects the actual implementation.

The params property name is confirmed in the source code (packages/router-core/src/link.ts, line 579) where MakeRequiredPathParams interface defines the params property. The documentation update aligns with the actual API and usage examples throughout the codebase.


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.

@schiller-manuel schiller-manuel merged commit 00617a7 into TanStack:main Jan 3, 2026
2 checks passed
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.

2 participants