# Optimize React Native Performance

React Native apps can suffer from slow lists, extra renders, and JS thread stalls. This skill provides focused patterns for faster FlatList screens, memoized components, optimized selectors, cached images, and profiling.

## Install

```bash
npx skillstore add cjharmath/rn-performance
```

## Metadata

- Status: approved
- Slug: cjharmath-rn-performance
- Skillstore revision: r1
- Version status: missing
- Tree hash: 72fd8c79cc30d654d4f957c1b68237f2ee28ea16c0e9910acd2cc0cb1098886e
- Author: CJHarmath
- GitHub username: CJHarmath
- License: MIT
- Repository: https://github.com/CJHarmath/claude-agents-skills/tree/main/skills/rn-performance
- Ref: dd4a3ef9f20ddf38830950b4bb713df96b431fd6
- Supported tools: Claude, Codex, Claude Code
- Audit status: complete
- Agent install advisory: allowed
- Manual install advisory: allowed
- Artifact signature: available
- Audit attestation: unavailable
- Human verification: not\_verified
- Risk factors: external\_commands
- Quality score: 79
- Quality tier: bronze
- Public page: https://skillstore.pages.dev/skills/cjharmath-rn-performance
- Manifest: https://skillstore.pages.dev/api/skills/cjharmath-rn-performance/manifest

## Capabilities

- Guides stable FlatList keyExtractor, renderItem, and getItemLayout patterns.
- Explains when to consider FlashList for large or complex lists.
- Shows useMemo, useCallback, and React.memo patterns for reducing re-renders.
- Improves Zustand selector usage with focused selectors and shallow comparison.
- Covers expo-image caching, render detection, and JS thread deferral patterns.
- Provides a checklist for diagnosing jank, slow renders, memory growth, and UI freezes.

## Use Cases

- Fix Janky List Screens: Diagnose slow FlatList screens and apply stable keys, item layout, memoized rows, and render window settings.
- Review Release Performance: Check list-heavy screens for avoidable renders, expensive selectors, image cache issues, and JS thread blocking before release.
- Teach Render Hygiene: Use the examples to explain when memoization helps, when it adds overhead, and how to profile render behavior.

## Prompt Templates

### Find Simple List Issues

```
Review this React Native list screen for obvious performance issues. Focus on stable keys, renderItem, getItemLayout, and inline callbacks.
```

### Reduce Re-Renders

```
Analyze these components for unnecessary re-renders. Recommend where React.memo, useMemo, useCallback, or StyleSheet.create would help.
```

### Optimize State Selectors

```
Review this Zustand usage for selector problems. Suggest focused selectors, shallow comparison, and safer component boundaries.
```

### Plan a Performance Pass

```
Create a prioritized performance plan for this React Native feature. Include profiling steps, list changes, image handling, memoization, and JS thread risks.
```

## Limitations

- It does not run profilers or benchmark app performance by itself.
- Examples assume React Native, Expo, and TypeScript-style codebases.
- FlashList guidance requires separate dependency evaluation and device testing.
- It does not replace performance testing on real low-end devices.

## Best Practices

- Profile first, then optimize the component or list that actually causes delay.
- Use stable props and selectors before adding broad memoization.
- Validate improvements on real devices, especially lower-end Android hardware.

## Anti Patterns

- Do not memoize every simple value without measuring the cost.
- Do not pass inline objects or callbacks into memoized child components.
- Do not select an entire Zustand store when a component needs only one value.

## Security Audit

- Audited at: 2026-07-06T05:42:20.64\+00:00
- Summary: All static findings were adjudicated as false positives. The detections come from Markdown fences, inline backticks, TypeScript examples, and a React.memo prop comparison in a documentation-only skill. No prompt injection, external command execution, network access, filesystem access, or data exfiltration intent was found in SKILL.md.

## Stats

- Views: 265
- Downloads: 10
- Favorites: 0
- Popularity score: 0
