Skip to content

Decompose PureReportActionItem to isolate hooks per action type #87157

@cristipaval

Description

@cristipaval

Problem

PureReportActionItem is a 2,200+ line monolith with 100+ if/else if branches. Every render evaluates the full chain and runs all top-level hooks (useOnyx, useMemo) regardless of which action type is actually being displayed.

Proposed fix

Extract groups of related branches into focused child components (PolicyChangeLogContent, ApprovalFlowContent, PaymentContent, etc.), then move action-type-specific hooks into those children so they only run when needed.

Issue OwnerCurrent Issue Owner: @LukasMod

Metadata

Metadata

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions