vercel-react-native-skills

Applies React Native and Expo performance rules to mobile app code generation and refactoring.

2|1|Updated Apr 17, 2025
One-click install
npx skills add https://github.com/abraham-yusuf/pernikahan-web --skill vercel-react-native-skills-abraham-yusuf
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: vercel-react-native-skills
Source: https://github.com/abraham-yusuf/pernikahan-web/tree/main/.agents/skills/vercel-react-native-skills
Command: npx skills add https://github.com/abraham-yusuf/pernikahan-web --skill vercel-react-native-skills-abraham-yusuf

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? React Native apps frequently suffer from scroll jank, render thrashing, and runtime crashes caused by common mistakes like inline objects in lists, animating layout properties, or tracking scroll position in state. This Skill gives AI agents a prioritized rulebook of 35+ best practices so generated or refactored mobile code follows proven performance patterns from the start. ## Core Features & Use Cases - Prioritized Rule Library: 35+ rules across 13 categories ranked by impact, from CRITICAL rendering rules (avoid falsy && in JSX, wrap strings in Text) to LOW-priority font and import optimizations. - Incorrect vs. Correct Examples: Every rule includes side-by-side TypeScript/TSX code comparisons with explanations, covering LegendList/FlashList virtualization, Reanimated animations, GestureDetector press states, and native navigators. - React Compiler Guidance: Dedicated rules for React Compiler compatibility, including destructuring functions early and using .get()/.set() on Reanimated shared values. - Use Case: When an agent generates a product feed screen, it applies the list-performance rules to use a virtualized list with stable object references, primitive props for memoized items, and compressed thumbnail images instead of a ScrollView with mapped children. ## Quick Start Review my React Native feed screen component and refactor it to follow the list performance and animation best practices.

Frequently Asked Questions about vercel-react-native-skills

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I optimize FlatList performance in React Native?

Use a virtualized list like LegendList or FlashList instead of ScrollView, pass stable object references as data, and give list items primitive props so memo() shallow comparison works. Avoid inline objects and callbacks inside renderItem since new references break memoization.

Should I use FlashList or LegendList for large lists?

Both are recommended virtualizers that render only visible items, reducing memory and mount time compared to ScrollView. LegendList additionally supports getItemType for heterogeneous lists, which creates separate recycling pools per item layout.

Why does my React Native app crash when rendering conditional values?

Using {value && <Component />} crashes when value is an empty string or 0, because React Native tries to render the falsy value as text outside a Text component. Use a ternary with null, explicit boolean coercion, or an early return instead.

How do I animate components in React Native without jank?

Animate only transform and opacity properties with Reanimated, since these run on the GPU without triggering layout recalculation. Animating width, height, margin, or padding forces layout on every frame and causes dropped frames.

Does React Compiler work with Reanimated shared values?

Yes, but you must use .get() and .set() methods instead of reading or writing .value directly. The compiler cannot track property access on shared values, so explicit method calls ensure correct behavior.

When should I use native navigators instead of JS navigators?

Always prefer native stack and native tab navigators, such as @react-navigation/native-stack or expo-router defaults, over JS-based ones. Native navigators run transitions on the UI thread and provide platform behaviors like iOS large titles and proper safe area handling.