Skip to content

fix(components): Move Wrapper to module scope in recursiveStructuredData#120035

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

fix(components): Move Wrapper to module scope in recursiveStructuredData#120035
sentry[bot] wants to merge 1 commit into
masterfrom
seer/fix-recursive-structured-data-wrapper

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 component. This caused a static-component-definitions violation, as a new component type was created on every render.

This pattern leads to React unmounting and remounting the Wrapper's children on every re-render, resetting their state and hindering React Compiler optimizations.

This change moves the Wrapper component to module scope and passes formattedObjectKey as a prop, ensuring a stable component identity and resolving the static-component-definitions issue.

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-36G

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