Skip to content

Conversation

@ryan953
Copy link
Member

@ryan953 ryan953 commented Sep 29, 2025

This documents some new nested-route fields that were added in getsentry/sentry#100481


Note

Extend RTL testing docs with outlet context configuration and nested routes examples, plus a clarified route param section.

  • Docs (Using React Testing Library):
    • Route Param Values: Add a dedicated heading and example clarifying use of route for useParams().
    • Outlet Context: Document passing initialRouterConfig.outletContext and consuming via useOutletContext().
    • Nested Routes:
      • Show configuring an in-memory route tree via initialRouterConfig.children.
      • Add wrapper Outlet with typed context and custom hook, plus examples for index and param child routes.

Written by Cursor Bugbot for commit c139854. This will update automatically on new commits. Configure here.

@vercel
Copy link

vercel bot commented Sep 29, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
develop-docs Ready Ready Preview Comment Sep 30, 2025 5:27pm
1 Skipped Deployment
Project Deployment Preview Comments Updated (UTC)
sentry-docs Ignored Ignored Preview Sep 30, 2025 5:27pm

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.


```tsx
function TestComponent() {
const { id } = useOutletContext();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should suggest they use a typed hook no? These return unknown.

Really they should be typed as

interface OutletContext {
  id: string
}

export function useWhateverOutletContext() {
  return useOutletContext<OutletContext>();
}

export function MyParentView() {
  return <Outlet id="whatever" />
}

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah yeah. i can add that in so it's most copy+pasteable

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

@ryan953 ryan953 merged commit 1cd0abf into master Sep 30, 2025
12 checks passed
@ryan953 ryan953 deleted the ryan953/rtl-child-routes branch September 30, 2025 19:38
@github-actions github-actions bot locked and limited conversation to collaborators Oct 16, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants