Skip to content

[Bug] FlatList in search results has no keyExtractor — React key warning and potential render bugs #863

Description

@RUKAYAT-CODER

Overview

The search results FlatList does not have a keyExtractor prop. React Native uses the array index as the key, causing incorrect re-renders when results are reordered or filtered, and triggering React key warnings in development.

Specifications

Features:

  • Add keyExtractor={(item) => item.id} to the search results FlatList
  • Confirm all other FlatLists in the app have unique, stable key extractors

Tasks:

  • Add keyExtractor to the search results list
  • Audit all FlatList usages in the codebase for missing keyExtractor
  • Write a test that renders the list with reordered results and confirms no key warning

Impacted Files:

  • src/screens/SearchScreen.tsx
  • All FlatList usages missing keyExtractor

Acceptance Criteria

  • No React key warnings in development mode
  • List re-renders correctly when results are reordered
  • All FlatLists in the app have stable keyExtractors

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave programbugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions