Skip to content

fix(react): Move Wrapper component to module scope in RecursiveStructuredData#120034

Closed
sentry[bot] wants to merge 1 commit into
masterfrom
seer/fix/static-component-definition-recursive-structured-data
Closed

fix(react): Move Wrapper component to module scope in RecursiveStructuredData#120034
sentry[bot] wants to merge 1 commit into
masterfrom
seer/fix/static-component-definition-recursive-structured-data

Conversation

@sentry

@sentry sentry Bot commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

The Wrapper component in static/app/components/structuredEventData/recursiveStructuredData.tsx was defined inside the RecursiveStructuredData function body. This caused a static-component-definitions violation, as React would treat it as a new component type on every render, leading to unnecessary unmounting/remounting of its subtree and blocking React Compiler optimizations.

This change extracts the Wrapper component to module scope and passes the formattedObjectKey as a prefix prop, ensuring a stable component identity and resolving the violation.

Legal Boilerplate

Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.

Fixes CODING-CONVENTIONS-363

Comment @sentry <feedback> on this PR to have Autofix iterate on the changes.

@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Jul 19, 2026
@ryan953

ryan953 commented Jul 20, 2026

Copy link
Copy Markdown
Member

replaced by #120038

@ryan953 ryan953 closed this Jul 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant