Repository navigation
docs(react-router): Update framework guides for v11 - #19366
Conversation
SDK v11 raises the React Router framework-mode minimum to 7.15. Change the stated support from v7+ to v7.15+, add a prerequisites include that lists the minimum version, and drop the feature-scoped 7.15 notes on the instrumentation API now that it's the baseline. The docs only describe the instrumentation API going forward; the removed server wrappers are covered by the v10-to-v11 migration guide. Refs SDK-1466 Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01833WEY4kqAQNfbtu9Z8JLr
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
The React Router Framework SDK leaves beta with v11. Drop the beta warning alerts from the getting started and manual setup pages. Refs SDK-1466 Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01833WEY4kqAQNfbtu9Z8JLr
|
bugbot run |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit cb59921. Configure here.
…h for v11 In v11 the Vite plugin exports (sentryReactRouter, sentryOnBuildEnd, SentryReactRouterBuildOptions) moved to the @sentry/react-router/vite subpath. Update the manual setup and Hydrogen guides to import from it. The manual setup page creates instrument.server.mjs in the project root but the entry.server.tsx snippet imported it from ./, which fails to resolve from app/. Import it from ../ instead. Also move the diff marker in the react-router.config.ts snippet to the start of the line so it no longer renders as a unary plus. Refs SDK-1486 Refs SDK-1516 Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01833WEY4kqAQNfbtu9Z8JLr
|
|
||
| +// Automatically instruments all server loaders, actions, middleware, | ||
| +// and request handlers. Requires React Router 7.15+. | ||
| +// and request handlers. |
There was a problem hiding this comment.
Bug: The import path for instrument.server.mjs in the Hydrogen React Router guide is incorrect, causing server-side instrumentation to fail.
Severity: MEDIUM
Suggested Fix
In docs/platforms/javascript/guides/cloudflare/frameworks/hydrogen-react-router.mdx, change the import statement from import "./instrument.server"; to import "../instrument.server"; to correctly point to the file located in the project's root directory.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.
Location: docs/platforms/javascript/guides/react-router/manual-setup.mdx#L265
Potential issue: The pull request updates the import path for `instrument.server.mjs` in
`manual-setup.mdx` to `../instrument.server` to reflect its location in the project
root. However, it fails to apply the same fix to the `hydrogen-react-router.mdx` guide.
This guide still instructs users to import the file using `import
"./instrument.server";` from `app/entry.server.tsx`. This relative path is incorrect, as
the file is not in the `app/` directory, leading to a failed import and preventing
Sentry from being initialized on the server for users following this guide.
Also affects:
docs/platforms/javascript/guides/cloudflare/frameworks/hydrogen-react-router.mdx
Did we get this right? 👍 / 👎 to inform future reviews.
DESCRIBE YOUR PR
Updates the React Router Framework docs for SDK v11: state the new 7.15 framework-mode minimum, drop the beta warnings, only describe the instrumentation API for server-side tracing, and fix the snippets that no longer build against v11.
getting-started-prerequisitesinclude for React Router that lists the7.15.0minimum (framework mode)instrumentationsexport, since 7.15 is now the baselinesentryReactRouter,SentryReactRouterBuildOptions, andsentryOnBuildEndfrom@sentry/react-router/viteon the manual setup and Hydrogen pagesentry.server.tsxsnippet to import../instrument.server(the file lives in the project root, the entry inapp/)+diff marker in thereact-router.config.tssnippet so it no longer renders as a unary plusThe removed
wrapServerLoader/wrapServerActionwrappers are already covered by the v10-to-v11 migration guide and aren't referenced anywhere else in the docs.Supersedes #19314.
Fixes https://linear.app/getsentry/issue/SDK-1466/update-react-router-minimum-version-to-715-in-docs
Fixes https://linear.app/getsentry/issue/SDK-1486/update-react-router-vite-plugin-imports-for-v11-in-docs
Fixes https://linear.app/getsentry/issue/SDK-1516/react-router-getting-started-manual-setup
IS YOUR CHANGE URGENT?
Help us prioritize incoming PRs by letting us know when the change needs to go live.
Select exactly one option. For deadlines, replace
YYYY-MM-DDwith the due date. You can update this information later by editing the PR description.SLA
Thanks in advance for your help!
PRE-MERGE CHECKLIST
Make sure you've checked the following before merging your changes:
🤖 Generated with Claude Code
https://claude.ai/code/session_01833WEY4kqAQNfbtu9Z8JLr