A structured repository for creating and maintaining React Native Best Practices optimized for agents and LLMs. - rules/ - Individual rule files (one per rule) - sections.md - Section metadata (titles, impacts, descriptions) - template.md - Template for creating new rules - area-description.md - Individual rule files - metadata.json - Document metadata (version, organization, abstract) - AGENTS.md
Add this skill
npx mdskills install vercel-labs/react-native-skillsComprehensive React Native best practices organized by priority with clear categorization and examples
1---2name: vercel-react-native-skills3description:4 React Native and Expo best practices for building performant mobile apps. Use5 when building React Native components, optimizing list performance,6 implementing animations, or working with native modules. Triggers on tasks7 involving React Native, Expo, mobile performance, or native platform APIs.8license: MIT9metadata:10 author: vercel11 version: '1.0.0'12---1314# React Native Skills1516Comprehensive best practices for React Native and Expo applications. Contains17rules across multiple categories covering performance, animations, UI patterns,18and platform-specific optimizations.1920## When to Apply2122Reference these guidelines when:2324- Building React Native or Expo apps25- Optimizing list and scroll performance26- Implementing animations with Reanimated27- Working with images and media28- Configuring native modules or fonts29- Structuring monorepo projects with native dependencies3031## Rule Categories by Priority3233| Priority | Category | Impact | Prefix |34| -------- | ---------------- | -------- | -------------------- |35| 1 | List Performance | CRITICAL | `list-performance-` |36| 2 | Animation | HIGH | `animation-` |37| 3 | Navigation | HIGH | `navigation-` |38| 4 | UI Patterns | HIGH | `ui-` |39| 5 | State Management | MEDIUM | `react-state-` |40| 6 | Rendering | MEDIUM | `rendering-` |41| 7 | Monorepo | MEDIUM | `monorepo-` |42| 8 | Configuration | LOW | `fonts-`, `imports-` |4344## Quick Reference4546### 1. List Performance (CRITICAL)4748- `list-performance-virtualize` - Use FlashList for large lists49- `list-performance-item-memo` - Memoize list item components50- `list-performance-callbacks` - Stabilize callback references51- `list-performance-inline-objects` - Avoid inline style objects52- `list-performance-function-references` - Extract functions outside render53- `list-performance-images` - Optimize images in lists54- `list-performance-item-expensive` - Move expensive work outside items55- `list-performance-item-types` - Use item types for heterogeneous lists5657### 2. Animation (HIGH)5859- `animation-gpu-properties` - Animate only transform and opacity60- `animation-derived-value` - Use useDerivedValue for computed animations61- `animation-gesture-detector-press` - Use Gesture.Tap instead of Pressable6263### 3. Navigation (HIGH)6465- `navigation-native-navigators` - Use native stack and native tabs over JS navigators6667### 4. UI Patterns (HIGH)6869- `ui-expo-image` - Use expo-image for all images70- `ui-image-gallery` - Use Galeria for image lightboxes71- `ui-pressable` - Use Pressable over TouchableOpacity72- `ui-safe-area-scroll` - Handle safe areas in ScrollViews73- `ui-scrollview-content-inset` - Use contentInset for headers74- `ui-menus` - Use native context menus75- `ui-native-modals` - Use native modals when possible76- `ui-measure-views` - Use onLayout, not measure()77- `ui-styling` - Use StyleSheet.create or Nativewind7879### 5. State Management (MEDIUM)8081- `react-state-minimize` - Minimize state subscriptions82- `react-state-dispatcher` - Use dispatcher pattern for callbacks83- `react-state-fallback` - Show fallback on first render84- `react-compiler-destructure-functions` - Destructure for React Compiler85- `react-compiler-reanimated-shared-values` - Handle shared values with compiler8687### 6. Rendering (MEDIUM)8889- `rendering-text-in-text-component` - Wrap text in Text components90- `rendering-no-falsy-and` - Avoid falsy && for conditional rendering9192### 7. Monorepo (MEDIUM)9394- `monorepo-native-deps-in-app` - Keep native dependencies in app package95- `monorepo-single-dependency-versions` - Use single versions across packages9697### 8. Configuration (LOW)9899- `fonts-config-plugin` - Use config plugins for custom fonts100- `imports-design-system-folder` - Organize design system imports101- `js-hoist-intl` - Hoist Intl object creation102103## How to Use104105Read individual rule files for detailed explanations and code examples:106107```108rules/list-performance-virtualize.md109rules/animation-gpu-properties.md110```111112Each rule file contains:113114- Brief explanation of why it matters115- Incorrect code example with explanation116- Correct code example with explanation117- Additional context and references118119## Full Compiled Document120121For the complete guide with all rules expanded: `AGENTS.md`122
Full transparency — inspect the skill content before installing.