Skip to content

feat(react-router): Register a route provider backed by resolved routes - #23560

Merged
logaretm merged 1 commit into
awad/route-provider-tanstackfrom
awad/route-provider-react-router
Aug 31, 2026
Merged

feat(react-router): Register a route provider backed by resolved routes#23560
logaretm merged 1 commit into
awad/route-provider-tanstackfrom
awad/route-provider-react-router

Conversation

@logaretm

@logaretm logaretm commented Aug 24, 2026

Copy link
Copy Markdown
Member

Registers a route provider for React Router framework mode.

The Data Router exposes its matches only through router state, and the package has no runtime dependency on react-router to call matchRoutes with, so the provider answers from routes already resolved rather than by matching.

Reuses getRouteTemplate (exported for this) rather than reading the leaf match, since nested routes carry paths relative to their parent and index and layout routes carry none. Records from both the hydrated router subscription and the instrumentation API, since each resolves routes the other never sees.

Part of #23556

@logaretm
logaretm force-pushed the awad/route-provider-react-router branch from 68e4f6e to 4fbacb2 Compare August 24, 2026 20:27
@github-actions

github-actions Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size % Change Change
@sentry/browser 28.56 kB - -
@sentry/browser - with treeshaking flags 26.92 kB - -
@sentry/browser - with treeshaking flags tracing without tracing 26.82 kB - -
@sentry/browser (incl. Tracing) 48.75 kB - -
@sentry/browser (incl. Tracing + Span Streaming) 48.76 kB - -
@sentry/browser (incl. Tracing, Profiling) 51.68 kB - -
@sentry/browser (incl. Tracing, Replay) 88.23 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 77.63 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 92.93 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 105.85 kB - -
@sentry/browser (incl. Feedback) 46.05 kB - -
@sentry/browser (incl. sendFeedback) 33.62 kB - -
@sentry/browser (incl. FeedbackAsync) 38.73 kB - -
@sentry/browser (incl. Metrics) 29.51 kB - -
@sentry/browser (incl. Logs) 29.8 kB - -
@sentry/browser (incl. Metrics & Logs) 30.43 kB - -
@sentry/react 30.3 kB - -
@sentry/react (incl. Tracing) 50.94 kB - -
@sentry/vue 35.73 kB - -
@sentry/vue (incl. Tracing) 51.29 kB +0.54% +275 B 🔺
@sentry/svelte 28.59 kB - -
CDN Bundle 30.72 kB +1.23% +372 B 🔺
CDN Bundle (incl. Tracing) 49.77 kB +0.79% +387 B 🔺
CDN Bundle (incl. Logs, Metrics) 32.98 kB +1.24% +402 B 🔺
CDN Bundle (incl. Tracing, Logs, Metrics) 51.66 kB +0.8% +405 B 🔺
CDN Bundle (incl. Replay, Logs, Metrics) 73.51 kB +0.47% +337 B 🔺
CDN Bundle (incl. Tracing, Replay) 87.24 kB +0.44% +377 B 🔺
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 89.09 kB +0.41% +361 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) 93.13 kB +0.37% +336 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 95.06 kB +0.45% +422 B 🔺
CDN Bundle - uncompressed 91.23 kB +1.43% +1.28 kB 🔺
CDN Bundle (incl. Tracing) - uncompressed 148.48 kB +0.88% +1.28 kB 🔺
CDN Bundle (incl. Logs, Metrics) - uncompressed 97.53 kB +1.34% +1.28 kB 🔺
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 154.17 kB +0.84% +1.28 kB 🔺
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 226.69 kB +0.57% +1.28 kB 🔺
CDN Bundle (incl. Tracing, Replay) - uncompressed 267.98 kB +0.49% +1.28 kB 🔺
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 273.65 kB +0.48% +1.28 kB 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 281.68 kB +0.46% +1.28 kB 🔺
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 287.35 kB +0.45% +1.28 kB 🔺
@sentry/nextjs (client) 53.84 kB +0.54% +284 B 🔺
@sentry/sveltekit (client) 49.61 kB +0.85% +416 B 🔺
@sentry/core/server 65.67 kB - -
@sentry/core/browser 52.26 kB +0.77% +395 B 🔺
@sentry/node 123.77 kB +0.02% +19 B 🔺
@sentry/node/import (ESM hook with diagnostics-channel injection) 85.53 kB - -
@sentry/node - without tracing 88.03 kB +0.02% +15 B 🔺
@sentry/node - without channel injection 103.18 kB +0.03% +22 B 🔺
@sentry/aws-serverless 96.42 kB +0.03% +27 B 🔺
@sentry/cloudflare (withSentry) - minified 201.04 kB - -
@sentry/cloudflare (withSentry) 500.26 kB - -

View base workflow run

@logaretm
logaretm force-pushed the awad/route-provider-react-router branch from 4fbacb2 to 2d6425b Compare August 24, 2026 20:39
@logaretm
logaretm force-pushed the awad/route-provider-react-router branch from 2d6425b to 25b30a7 Compare August 24, 2026 20:52
@logaretm
logaretm force-pushed the awad/route-provider-react-router branch from 25b30a7 to 0af152c Compare August 24, 2026 20:57
@logaretm
logaretm force-pushed the awad/route-provider-react-router branch from 0af152c to 8188315 Compare August 31, 2026 16:40
The Data Router exposes matches only through router state, and the package has
no runtime dependency on `react-router` to call `matchRoutes` with, so the
provider answers from routes already resolved rather than by matching.

Splits `getMatchedRoute` out of `getParameterizedRoute` so the provider can tell
a matched route from the raw-pathname fallback, and records from both the
hydrated router subscription and the instrumentation API, since each resolves
routes the other never sees.
@logaretm
logaretm force-pushed the awad/route-provider-react-router branch from 8188315 to 638dd93 Compare August 31, 2026 17:05
Base automatically changed from awad/route-provider-angular to awad/route-provider-tanstack August 31, 2026 17:06
@logaretm
logaretm merged commit 638dd93 into develop Aug 31, 2026
1 of 2 checks passed
@logaretm
logaretm deleted the awad/route-provider-react-router branch August 31, 2026 17:06
@logaretm
logaretm restored the awad/route-provider-react-router branch August 31, 2026 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant