react-native-best-practices_skill

This skill helps you optimize React Native apps by applying proven performance guidelines for FPS, TTI, bundle size, and memory management.
  • TypeScript

1.3k

GitHub Stars

2

Bundled Files

2 months ago

Catalog Refreshed

3 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill storybookjs/react-native --skill react-native-best-practices

  • POWER.md6.7 KB
  • SKILL.md11.3 KB

Overview

This skill provides practical, prioritized React Native performance optimization guidance for FPS, TTI, bundle size, memory leaks, re-renders, and animations. It focuses on actionable fixes and measurement workflows for common pain points such as Hermes tuning, JS-thread blocking, bridge overhead, FlashList usage, native modules, and debugging jank. Use it to quickly find the highest-impact changes and the right profiling tools to validate improvements.

How this skill works

The skill organizes guidance by quick patterns, commands, config snippets, and deep-dive reference files so you can jump from a one-line fix to a full troubleshooting plan. It recommends measurement-first workflows (FPS/TTI profiling, native profilers, bundle analysis) and maps common problems to prioritized actions (CRITICAL, HIGH, MEDIUM). Each topic includes when-to-use guidance, common fixes, and pitfalls for both JS and native layers.

When to use it

  • UI is janky or animations drop frames and you need targeted fixes
  • App startup is slow and you want to reduce Time To Interactive (TTI)
  • Bundle or APK size is too large and needs analysis and tree shaking
  • Memory usage grows over time or you suspect leaks (JS or native)
  • Investigating excessive re-renders or bridge serialization overhead
  • Building or auditing native modules (Turbo Modules and threading)

Best practices

  • Profile before changing: measure FPS, CPU, and TTI to identify root cause
  • Replace ScrollView with FlatList or FlashList for long lists and virtualization
  • Adopt atomic/localized state (Zustand/Jotai) and React Compiler memoization to reduce re-renders
  • Analyze JS bundles with bundling commands and remove barrel imports and unnecessary polyfills
  • Use native profiling tools (Instruments / Android Studio) for heavy work and prefer async Turbo Module methods
  • Optimize Hermes setup (disable bundle compression for mmap, enable R8 on Android) and prefer native SDKs over polyfills

Example use cases

  • Diagnose and fix a screen that drops frames during scroll using DevTools and replacing ScrollView with FlashList
  • Reduce cold-start TTI by measuring startup markers and deferring noncritical JS initialization
  • Shrink release bundle by running a bundle build and source-map analysis, removing barrel imports and dead code
  • Track down a memory leak by sampling JS heap and checking native allocations in Instruments
  • Improve animation smoothness by moving heavy logic off the JS thread and using Reanimated worklets

FAQ

Start with FlatList for simple lists; use FlashList for large or complex lists when scroll performance or memory usage is problematic because FlashList optimizes rendering and recycling.

When should I tune Hermes settings?

Tune Hermes when you observe slow cold starts, mmap benefits, or when bundle compression prevents Hermes memory mapping; measure first and test enabling/disabling options on target devices.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational
react-native-best-practices skill by storybookjs/react-native | VeilStrat