All skills
vercel-labs avatar

/vercel-react-native-skills

@f2d73db
by Vercel Labsvercel-labs/openreview1.7k stars
118

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.

Use this Skill: https://skilld.dev/gh/vercel-labs/openreview/vercel-react-native-skills

This session only. Nothing lands on disk.

rulesui-styling.md

≈553 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Modern React Native Styling Patterns

Follow these styling patterns for cleaner, more consistent React Native code.

Always use borderCurve: 'continuous' with borderRadius:

// Incorrect
{ borderRadius: 12 }

// Correct – smoother iOS-style corners
{ borderRadius: 12, borderCurve: 'continuous' }

Use gap instead of margin for spacing between elements:

// Incorrect – margin on children
<View>
  <Text style={{ marginBottom: 8 }}>Title</Text>
  <Text style={{ marginBottom: 8 }}>Subtitle</Text>
</View>

// Correct – gap on parent
<View style={{ gap: 8 }}>
  <Text>Title</Text>
  <Text>Subtitle</Text>
</View>

Use padding for space within, gap for space between:

<View style={{ padding: 16, gap: 12 }}>
  <Text>First</Text>
  <Text>Second</Text>
</View>

Use experimental_backgroundImage for linear gradients:

// Incorrect – third-party gradient library
<LinearGradient colors={['#000', '#fff']} />

// Correct – native CSS gradient syntax
<View
  style={{
    experimental_backgroundImage: 'linear-gradient(to bottom, #000, #fff)',
  }}
/>

Use CSS boxShadow string syntax for shadows:

// Incorrect – legacy shadow objects or elevation
{ shadowColor: '#000', shadowOffset: { width: 0, height: 2 }, shadowOpacity: 0.1 }
{ elevation: 4 }

// Correct – CSS box-shadow syntax
{ boxShadow: '0 2px 8px rgba(0, 0, 0, 0.1)' }

Avoid multiple font sizes – use weight and color for emphasis:

// Incorrect – varying font sizes for hierarchy
<Text style={{ fontSize: 18 }}>Title</Text>
<Text style={{ fontSize: 14 }}>Subtitle</Text>
<Text style={{ fontSize: 12 }}>Caption</Text>

// Correct – consistent size, vary weight and color
<Text style={{ fontWeight: '600' }}>Title</Text>
<Text style={{ color: '#666' }}>Subtitle</Text>
<Text style={{ color: '#999' }}>Caption</Text>

Limiting font sizes creates visual consistency. Use fontWeight (bold/semibold) and grayscale colors for hierarchy instead.

Source: SKILL.md on GitHub

No alerts17d4 checks · Risk SAFE
  • Gen Agent Trust Hub17d

    This skill provides a comprehensive set of React Native and Expo best practices optimized for AI agents and LLMs. It focuses on performance optimization, UI patterns, and proper state management within mobile applications. The skill is entirely composed of documentation and guidelines without any executable scripts or hidden network operations, making it safe for use.

  • Socket17d

    No alerts

  • Snyk17d

    Risk: LOW · No issues

  • Runlayer6mo

    39 files scanned · No issues

Signed by skilld at f2d73db. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 months ago.

Dormantupdated 7 months ago
metadata
{
  "author": "vercel",
  "version": "1.0.0"
}
  • Performance
  • react-native
  • expo
  • animations
  • reanimated
  • flashlist
  • mobile
  • native-modules
  • monorepo

README badge

README badge for vercel-labs/openreview/vercel-react-native-skills

Provides React Native and Expo best practices organized by priority, covering list performance, animations, navigation, UI patterns, and native module configuration. Use when building or optimizing React Native components, implementing Reanimated animations, or configuring native dependencies in Expo projects.

Generated from the current SKILL.md.

Does this skill cover both React Native and Expo?
Yes. The skill provides best practices for React Native and Expo applications, including Expo-specific patterns like expo-image and config plugins.
What animation library does this skill assume?
Reanimated. The skill includes rules for animating with Reanimated, such as using useDerivedValue and limiting animations to transform and opacity properties.
Does this skill address monorepo setups?
Yes. It includes rules for structuring monorepo projects with native dependencies, such as keeping native dependencies in the app package and maintaining single dependency versions across packages.
What is the priority focus of this skill?
List performance is marked as critical priority, covering virtualization with FlashList, memoization, and image optimization. Animation and navigation are high priority.

Generated from the current SKILL.md. These answers refresh after source changes.