published fresh until

My React Native list is janky: how do I get my agent to fix it?

Summary As of October 2026, Callstack's react-native-best-practices skill (MIT) tells the agent to measure first, replace ScrollView maps with FlashList or FlatList, check the FlashList major version, and avoid speculative memo changes. Expo's data-fetching skill adds four screen states.

Not for Expo list-to-detail routing; see expo-router-list-detail-native-screens

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

The problem

A mobile list screen that renders hundreds of rows in a ScrollView, or re-renders everything on each keystroke, scrolls badly. Agents tend to sprinkle useMemo and useCallback rather than find the cause.

What the sources say

  • Callstack's agent-skills (MIT) includes react-native-best-practices, based on its optimization guide. Its workflow is Measure, Optimize, Re-measure, Validate; if the metric did not improve, revert. Its guardrails: check library versions first (FlashList v2 deprecates estimatedItemSize, so do not flag it as missing there), do not change useMemo/useCallback dependencies unless behaviour is wrong or profiling shows waste, and do not report stale closures without evidence.
  • Its list reference ranks "replace ScrollView with FlatList, FlashList or Legend List" as CRITICAL: a ScrollView that maps all items mounts them all; use FlashList with a keyExtractor instead (@shopify/flash-list v2 needs the New Architecture; @legendapp/list is a JS-only option).
  • Expo's expo-data-fetching skill (MIT, commit 927dd7c) says every data screen has loading, error, empty and content states; empty means "resolved with zero items", so never show it during the first load; use ListEmptyComponent with a next action; keep cached content visible when a refresh fails.

How to describe it to the agent

The Feed screen drops frames when scrolling and typing in search. Use the react-native-best-practices skill. First measure (profile the interaction and report the heaviest commit), then check whether the list is a ScrollView map; if so move to FlashList and tell me the installed major version before touching estimated sizes. Do not add useMemo or useCallback without profiler evidence. Add ListEmptyComponent for "no items" and "no results" separately. Re-measure and show before and after numbers.

Mistakes to check

  • Fixes applied with no before and after measurement.
  • Outdated FlashList v1 advice applied to a v2 project.
  • An empty state shown while data is still loading.

Limits

I have not profiled an app with these skills. Some references use the agent-device tool; review any shell command a skill suggests before running it.

Sources

Primary sources: React Native docs, ScrollView and Optimizing FlatList configuration, and the FlashList v2 migration guide (checked 18 October 2026), plus the two skill repos named above.

  • Confirms: ScrollView "renders all its react child components at once", which the docs say slows rendering and raises memory use, and FlatList renders lazily and removes items far off screen; FlatList is built on VirtualizedList with a default windowSize of 21; a keyExtractor is used for caching and as the React key; FlashList v2 only works on the New Architecture and removes estimatedItemSize (and the related estimatedListSize and estimatedFirstItemOffset), which supports the version guardrail.
  • A nuance to keep: the React Native docs do advise wrapping renderItem in useCallback and using React.memo for FlatList items, so the skill's "no useMemo/useCallback without profiling evidence" is a stricter measure-first rule rather than an official one.
  • Not covered by official docs: the Expo skill's loading, error, empty and content states, and the ListEmptyComponent advice (that is the Expo maintainers' own skill text), and whether the prompt produces better results.

Started from a post by @Callstack Incubator, packaged by the editor. Original post

Subjects

More in agent skills

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# My React Native list is janky: how do I get my agent to fix it?
Summary: As of October 2026, Callstack's react-native-best-practices skill (MIT) tells the agent to measure first, replace ScrollView maps with FlashList or FlatList, check the FlashList major version, and avoid speculative memo changes. Expo's data-fetching skill adds four screen states.
Copy for agent
get the whatworks thread react-native-fast-list-empty-states and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread react-native-fast-list-empty-states
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp/login and sign me in so I have an account. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp/login && claude mcp login whatworks
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp/login && codex mcp login whatworks