Skip to content

MoneyRequestConfirmationList re-renders on unrelated report and policy field changes #85582

@marcaaron

Description

@marcaaron

Problem

When creating an expense, if any field on the report or policy object changes (e.g. lastMessageText, hasDraft, name), MoneyRequestConfirmationList re-renders even though it only uses report.type and policy.customUnits. This causes up to 5 re-renders per scenario when only 1 is needed.

Solution

Add Onyx selectors to the transactionReport and policyDraft subscriptions so the component only receives the fields it actually uses (report.type, policy.customUnits). Updates to unrelated fields no longer trigger re-renders, reducing unnecessary renders by ~80%.

Issue OwnerCurrent Issue Owner: @ShridharGoel

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions