Skip to content

Conversation

nlynzaad
Copy link
Contributor

@nlynzaad nlynzaad commented Oct 9, 2025

added some additional context regarding the determination of the from location specifically with regards to when it's called directly from the Route and when used in conjunction with pathless layout routes.

Summary by CodeRabbit

  • Documentation
    • Clarified how relative navigation determines the "from" location when invoked on a specific route, improving predictability of route-scoped navigation.
    • Added a pitfall note for pathless layout routes: relative paths resolve from the parent of the pathless layout, which can change expected destinations.
    • Improved guidance to help debug relative routing edge cases.

@github-actions github-actions bot added the documentation Everything documentation related label Oct 9, 2025
Copy link
Contributor

coderabbitai bot commented Oct 9, 2025

Walkthrough

Added documentation clarifications to the React Router navigation guide describing how relative link resolution determines the "from" location when using Route.useNavigate and how pathless layout routes treat their parent as the "from" location. No code changes.

Changes

Cohort / File(s) Summary
Documentation — React Router Navigation Guide
docs/router/framework/react/guide/navigation.md
Added notes clarifying that Route.useNavigate treats the route it’s called on as the "from" location, and that pathless layout routes use their parent as the "from" for relative routing resolution. Documentation-only edits; no behavioral changes.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

I nibble notes in the router glade,
Clarifying hops where paths are laid.
When a route whispers "useNavigate" near,
I know from which burrow we appear.
A cheerful twitch—documentation clear. 🥕

Pre-merge checks and finishing touches

✅ 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 indicates that this is a documentation update for relative navigation by adding additional context about the “from” location, matching the changes described in the PR and providing a concise summary of the main update.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch docs-relativelinks

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5a3255d and 269b2d8.

📒 Files selected for processing (1)
  • docs/router/framework/react/guide/navigation.md (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • docs/router/framework/react/guide/navigation.md

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

Copy link

nx-cloud bot commented Oct 9, 2025

View your CI Pipeline Execution ↗ for commit 269b2d8

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

☁️ Nx Cloud last updated this comment at 2025-10-09 21:05:15 UTC

Copy link
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

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3097080 and 5a3255d.

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

📄 CodeRabbit inference engine (AGENTS.md)

Use internal docs links relative to the docs/ folder (e.g., ./guide/data-loading)

Files:

  • docs/router/framework/react/guide/navigation.md
docs/{router,start}/**

📄 CodeRabbit inference engine (AGENTS.md)

Place router docs under docs/router/ and start framework docs under docs/start/

Files:

  • docs/router/framework/react/guide/navigation.md
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Preview

Copy link

pkg-pr-new bot commented Oct 9, 2025

More templates

@tanstack/arktype-adapter

npm i https://pkg.pr.new/TanStack/router/@tanstack/arktype-adapter@5424

@tanstack/directive-functions-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/directive-functions-plugin@5424

@tanstack/eslint-plugin-router

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

@tanstack/history

npm i https://pkg.pr.new/TanStack/router/@tanstack/history@5424

@tanstack/nitro-v2-vite-plugin

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

@tanstack/react-router

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

@tanstack/react-router-devtools

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

@tanstack/react-router-ssr-query

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

@tanstack/react-start

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-start@5424

@tanstack/react-start-client

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-start-client@5424

@tanstack/react-start-server

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-start-server@5424

@tanstack/router-cli

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

@tanstack/router-core

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

@tanstack/router-devtools

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

@tanstack/router-devtools-core

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

@tanstack/router-generator

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

@tanstack/router-plugin

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

@tanstack/router-ssr-query-core

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

@tanstack/router-utils

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

@tanstack/router-vite-plugin

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

@tanstack/server-functions-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/server-functions-plugin@5424

@tanstack/solid-router

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

@tanstack/solid-router-devtools

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

@tanstack/solid-start

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-start@5424

@tanstack/solid-start-client

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-start-client@5424

@tanstack/solid-start-server

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-start-server@5424

@tanstack/start-client-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-client-core@5424

@tanstack/start-plugin-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-plugin-core@5424

@tanstack/start-server-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-server-core@5424

@tanstack/start-static-server-functions

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

@tanstack/start-storage-context

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-storage-context@5424

@tanstack/valibot-adapter

npm i https://pkg.pr.new/TanStack/router/@tanstack/valibot-adapter@5424

@tanstack/virtual-file-routes

npm i https://pkg.pr.new/TanStack/router/@tanstack/virtual-file-routes@5424

@tanstack/zod-adapter

npm i https://pkg.pr.new/TanStack/router/@tanstack/zod-adapter@5424

commit: 269b2d8

@nlynzaad nlynzaad changed the title (Docs: Relative Navigation) - add extra context around the from location Docs(Relative Navigation): add extra context around the from location Oct 9, 2025
@nlynzaad nlynzaad merged commit 51da7fb into main Oct 9, 2025
6 checks passed
@nlynzaad nlynzaad deleted the docs-relativelinks branch October 9, 2025 21:07
LadyBluenotes pushed a commit to LadyBluenotes/router that referenced this pull request Oct 10, 2025
…TanStack#5424)

* add extra context

* ci: apply automated fixes

* add code rabbit suggestion

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
LadyBluenotes pushed a commit to LadyBluenotes/router that referenced this pull request Oct 10, 2025
…TanStack#5424)

* add extra context

* ci: apply automated fixes

* add code rabbit suggestion

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
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