Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/cold-schools-relate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"react-router": patch
---

Fix clientLoader.hydrate when an ancestor route is also hydrating a clientLoader
37 changes: 37 additions & 0 deletions .changeset/passthrough-reqeusts.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
"@react-router/dev": patch
"react-router": patch
---

Add `future.unstable_passThroughRequests` flag

By default, React Router normalizes the `request.url` passed to your `loader`, `action`, and `middleware` functions by removing React Router's internal implementation details (`.data` suffixes, `index` + `_routes` query params).

Enabling this flag removes that normalization and passes the raw HTTP `request` instance to your handlers. This provides a few benefits:

- Reduces server-side overhead by eliminating multiple `new Request()` calls on the critical path
- Allows you to distinguish document from data requests in your handlers base don the presence of a `.data` suffix (useful for observability purposes)

If you were previously relying on the normalization of `request.url`, you can switch to use the new sibling `unstable_url` parameter which contains a `URL` instance representing the normalized location:

```tsx
// ❌ Before: you could assume there was no `.data` suffix in `request.url`
export async function loader({ request }: Route.LoaderArgs) {
let url = new URL(request.url);
if (url.pathname === "/path") {
// This check will fail with the flag enabled because the `.data` suffix will
// exist on data requests
}
}

// ✅ After: use `unstable_url` for normalized routing logic and `request.url`
// for raw routing logic
export async function loader({ request, unstable_url }: Route.LoaderArgs) {
if (unstable_url.pathname === "/path") {
// This will always have the `.data` suffix stripped
}

// And now you can distinguish between document versus data requests
let isDataRequest = new URL(request.url).pathname.endsWith(".data");
}
```
5 changes: 5 additions & 0 deletions .changeset/remove-agnostic-types.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"react-router": patch
---

Internal refactor to consolidate framework-agnostic/React-specific route type layers - no public API changes
5 changes: 5 additions & 0 deletions .changeset/sweet-houses-kick.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"create-react-router": patch
---

chore: replace chalk with picocolors
10 changes: 10 additions & 0 deletions .changeset/unstable-url.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
"@react-router/dev": patch
"react-router": patch
---

Add a new `unstable_url: URL` parameter to route handler methods (`loader`, `action`, `middleware`, etc.) representing the normalized URL the application is navigating to or fetching, with React Router implementation details removed (`.data`suffix, `index`/`_routes` query params)

This is being added alongside the new `future.unstable_passthroughRequests` future flag so that users still have a way to access the normalized URL when that flag is enabled and non-normalized `request`'s are being passed to your handlers. When adopting this flag, you will only need to start leveraging this new parameter if you are relying on the normalization of `request.url` in your application code.

If you don't have the flag enabled, then `unstable_url` will match `request.url`.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,5 @@ worker-configuration.d.ts

# v7 reference docs
/public

.claude/settings.local.json
22 changes: 22 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# React Router Project Instructions

## Session Start

**REQUIRED**: Read [./AGENTS.md](./AGENTS.md) at the start of every session. It contains:

- Project architecture and key files
- React Router modes (Declarative, Data, Framework, RSC)
- Build/test commands (Jest unit tests, Playwright integration tests with `--project chromium`)
- Testing patterns and conventions
- Documentation guidelines

## During Work

**Always consult AGENTS.md** when you need to:

- Run tests or builds
- Understand which mode(s) a feature applies to
- Find key file locations
- Understand testing patterns

Do not guess at commands - reference AGENTS.md for the correct syntax.
3 changes: 3 additions & 0 deletions contributors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@
- KostiantynPopovych
- KubasuIvanSakwa
- KutnerUri
- kuzznicki
- kylegirard
- LadyTsukiko
- landisdesign
Expand Down Expand Up @@ -301,6 +302,7 @@
- mtendekuyokwa19
- mtliendo
- namoscato
- Nandann018-ux
- nanianlisao
- ned-park
- nenene3
Expand Down Expand Up @@ -356,6 +358,7 @@
- robbtraister
- RobHannay
- robinvdvleuten
- roli-lpci
- rossipedia
- rtmann
- rtzll
Expand Down
Loading