Skip to content

[Due for payment 2025-10-17] [$250] [Selectors] Bundle D (~18) #70404

Description

@mountiny

Parent

This is a child of #70272

Background

Inline selectors passed to useOnyx break memoization by creating a new function identity every render, causing unnecessary recomputations and re-renders. We’re standardizing selectors as first-class citizens to unlock recent useOnyx memoization improvements.

Goal

Refactor all inline selectors in this scope to one of:

  • Shared selector: lives in src/libs/onyx/selectors/<domain>/... when reused across components.
  • Local selector: defined outside the component (same file) if only used by that file.
  • Contextual selector: created with useCallback (inside the component) only when it needs component data; dependency array must include that data.

Example implementation for the Session keys: #70264

Keys to handle

  • User wallet - ONYXKEYS.USER_WALLET — 6
  • Report - ONYXKEYS.COLLECTION.REPORT — 5
  • Policy categories - ONYXKEYS.COLLECTION.POLICY_CATEGORIES — 2
  • Exit survey reason - ONYXKEYS.FORMS.EXIT_SURVEY_REASON — 2
  • Exit survey reason draft - ONYXKEYS.FORMS.EXIT_SURVEY_REASON_FORM_DRAFT — 2
  • Personal bank account - ONYXKEYS.PERSONAL_BANK_ACCOUNT — 1
Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021968348772489505781
  • Upwork Job ID: 1968348772489505781
  • Last Price Increase: 2025-09-17
  • Automatic offers:
    • LorenzoBloedow | Contributor | 108817045
Issue OwnerCurrent Issue Owner: @
Issue OwnerCurrent Issue Owner: @
Issue OwnerCurrent Issue Owner: @mallenexpensify

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionExternalAdded to denote the issue can be worked on by a contributorWeeklyKSv2

Type

No type

Projects

Status
Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions