{"name":"optimise-react-native-performance","description":"Speeds up a React Native UI that drops frames - long lists, extra renders, a heavy JS thread, and a slow cold start. Use when a FlatList is janky, scrolling stutters, startup is slow, or memory keeps climbing.","category":"apps","tags":["react-native","lists","performance"],"models":["any"],"proven":false,"passing_families":0,"model_testing":"Not yet model-tested; testing Jan 2027","url":"https://theskillvault.ai/skills/optimise-react-native-performance","api_url":"https://theskillvault.ai/api/skills/optimise-react-native-performance","raw_url":"https://theskillvault.ai/api/skills/optimise-react-native-performance/raw","body":"# Speed up React Native\n\nGuessing at memo and style tweaks rarely clears a stutter. Measure the slow path, then change the single thing the trace points at.\n\n## When to use\n- A long list drops frames while scrolling.\n- The JS thread stays busy and taps feel late.\n- Cold start takes long enough that people notice.\n\n## When not to use\n- The screen is a website in the browser. Web speed is a different checklist.\n- The project does not run yet. Get a build on a simulator first.\n- You only need tabs or a stack. That is a different skill.\n\n## Steps\n1. Reproduce the stutter on a release build, not only in dev. Dev mode is slower and will mislead you.\n2. Record a trace. Use the React Native performance monitor, or Xcode Instruments / Android Studio, and note whether the JS thread or the UI thread is the one that is busy.\n3. For a long list, use FlashList when you can, or a FlatList with `keyExtractor` and a stable `renderItem`. Do not create a new function for every row on each render.\n4. Give the list a row height it can trust (`estimatedItemSize` on FlashList, or `getItemLayout` on FlatList) so it does not measure every cell.\n5. Move images off the JS thread. Use a native image component and sizes that match the slot, not full-resolution photos in a thumbnail.\n6. Keep animations on the UI thread (Reanimated or a native driver). A JS `setInterval` that moves a view will drop frames.\n7. For a slow cold start, look at the JS bundle size and work done while modules import. Defer screens that are not on the first route.\n8. Compare the trace after the change. Keep the change only if the frame cost or the start cost actually moved.\n\n## Gotchas\n- Do not log tokens, passwords or personal data while profiling.\n- `console.log` inside a list row will wreck a release trace. Remove it.\n- An inline object style or an inline arrow created during render looks cheap and still re-renders every row.\n- This guide is adapted from Callstack's skill. It is not official React Native support, and it does not promise a frame rate.\n\n## Portability\nThe list and thread split is the same on iOS and Android. If you use Flutter or SwiftUI, profile on the device and virtualise long lists there too. The component names differ.\n\n## Done when\n- A release build shows the list scrolling without an obvious hitch, or you have a trace that names the remaining cost.\n- Row renderers are stable, and startup work that is not needed for the first screen is deferred.\n\n## Example prompt\n\"My React Native order list stutters when I scroll. Switch it to FlashList and stop the row component from re-rendering on every pass.\"\n\n---\nAdapted from \"react-native-best-practices\" in callstackincubator/agent-skills (MIT, Copyright (c) 2026 Callstack Incubator). See LICENSE.txt.","files":["LICENSE.txt"],"license":"MIT","license_name":"MIT License","license_url":"https://opensource.org/license/mit","attribution":"Based on work by Callstack Incubator (agent-skills, react-native-best-practices) (Copyright (c) 2026 Callstack Incubator, MIT License), https://github.com/callstackincubator/agent-skills/tree/59e9d17446a248b21d86f078fcd0bd2d36db1ca4/skills/react-native-best-practices; adapted by TheSkillVault, https://theskillvault.ai","install":{"claude_code":"curl -fsSL --create-dirs 'https://theskillvault.ai/api/skills/optimise-react-native-performance/raw' -o ~/'.claude/skills/optimise-react-native-performance/SKILL.md' && curl -fsSL --create-dirs 'https://theskillvault.ai/api/skills/optimise-react-native-performance/files/LICENSE.txt' -o ~/'.claude/skills/optimise-react-native-performance/LICENSE.txt'","cursor":"curl -fsSL --create-dirs 'https://theskillvault.ai/api/skills/optimise-react-native-performance/raw' -o '.cursor/skills/optimise-react-native-performance/SKILL.md' && curl -fsSL --create-dirs 'https://theskillvault.ai/api/skills/optimise-react-native-performance/files/LICENSE.txt' -o '.cursor/skills/optimise-react-native-performance/LICENSE.txt'","agents":"curl -fsSL --create-dirs 'https://theskillvault.ai/api/skills/optimise-react-native-performance/raw' -o '.agents/skills/optimise-react-native-performance/SKILL.md' && curl -fsSL --create-dirs 'https://theskillvault.ai/api/skills/optimise-react-native-performance/files/LICENSE.txt' -o '.agents/skills/optimise-react-native-performance/LICENSE.txt'","mcp_url":"https://theskillvault.ai/mcp","cursor_mcp_deeplink":"cursor://anysphere.cursor-deeplink/mcp/install?name=theskillvault&config=eyJ1cmwiOiJodHRwczovL3RoZXNraWxsdmF1bHQuYWkvbWNwIn0%3D","mcp_config":{"mcpServers":{"theskillvault":{"url":"https://theskillvault.ai/mcp"}}}},"bundles":[],"tested_on":[{"family":"chatgpt","name":"ChatGPT","outcome":null,"date":null,"source":null,"counts":false,"stale":false},{"family":"claude","name":"Claude","outcome":null,"date":null,"source":null,"counts":false,"stale":false},{"family":"gemini","name":"Gemini","outcome":null,"date":null,"source":null,"counts":false,"stale":false},{"family":"grok","name":"Grok","outcome":null,"date":null,"source":null,"counts":false,"stale":false},{"family":"llama","name":"Llama","outcome":null,"date":null,"source":null,"counts":false,"stale":false},{"family":"deepseek","name":"DeepSeek","outcome":null,"date":null,"source":null,"counts":false,"stale":false},{"family":"mistral","name":"Mistral","outcome":null,"date":null,"source":null,"counts":false,"stale":false},{"family":"qwen","name":"Qwen","outcome":null,"date":null,"source":null,"counts":false,"stale":false},{"family":"kimi","name":"Kimi K","outcome":null,"date":null,"source":null,"counts":false,"stale":false}],"proven_rule":{"threshold":5,"window_days":365,"computed_at":"2026-11-29T03:42:30.374Z"}}