vercel-labs / agent-skills
vercel-react-native-skills
React Native and Expo best practices for building performant mobile apps. Use when building React Native components, optimizing list performance, implementing animations, or working with native modules. Triggers on tasks involving React Native, Expo, mobile performance, or native platform APIs.
Install
npx skills add https://github.com/vercel-labs/agent-skills --skill vercel-react-native-skills- title
- Never Track Scroll Position in useState
- impact
- HIGH
- impactDescription
- prevents render thrashing during scroll
- tags
- scroll, performance, reanimated, useRef
Never Track Scroll Position in useState
Never store scroll position in useState. Scroll events fire rapidly—state
updates cause render thrashing and dropped frames. Use a Reanimated shared value
for animations or a ref for non-reactive tracking.
Incorrect (useState causes jank):
Correct (Reanimated for animations):
Correct (ref for non-reactive tracking):