Skip to content

Conversation

@ryan953
Copy link
Member

@ryan953 ryan953 commented Jan 17, 2026

Summary

Refactors ChoiceMapperField and TableField from class components to functional components to align with modern React patterns and Sentry's frontend guidelines (no new class components).

These components were identified as stateless class components (no internal state management), making them ideal candidates for conversion to functional components.

Changes

ChoiceMapperField

  • Converted class component to functional component
  • Removed Component import and class syntax
  • Moved static defaultProps to default parameter values
  • Moved hasValue instance method to standalone helper function
  • Maintained all existing functionality including async dropdown support

TableField

  • Converted class component to functional component
  • Removed Component import and class syntax
  • Moved static defaultProps to default parameter values
  • Moved hasValue instance method to standalone helper function
  • Maintained all existing functionality including row add/remove operations

Test plan

  • ✅ Linting passes for both components
  • ✅ All existing tests pass:
    • choiceMapperField.spec.tsx - 9 tests passing
    • tableField.spec.tsx - 6 tests passing
  • ✅ No functional changes - component behavior is identical
…mponents

Refactors ChoiceMapperField and TableField from class components to functional components to align with modern React patterns and Sentry's frontend guidelines (no new class components).

Changes:
- Converted both class components to functional components
- Removed Component import and class syntax
- Moved static defaultProps to default parameter values
- Moved instance methods to standalone helper functions
- Maintained all existing functionality and behavior

These were identified as stateless class components (no internal state management), making them ideal candidates for conversion to functional components.
@ryan953 ryan953 requested a review from a team as a code owner January 17, 2026 04:20
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Jan 17, 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

2 participants