Skip to content
expo-sdk logo

Expo SDK

expo-sdk

Expo SDK 54+ platform patterns. Use when configuring Expo apps, setting up root layouts, using expo-image, expo-haptics, safe areas, bottom sheets, FlashList, or StatusBar.

SKILL.md

Full skill instructions

Expo SDK

Overview

Expo SDK 54+ provides a managed React Native development environment with file-based routing (Expo Router), native module access, and streamlined build tooling. This skill covers app configuration, the root layout provider pattern, and key Expo/​RN libraries.

Prerequisite: npx create-expo-app or Expo SDK 54+ in package.json

Workflows

Setting up a new Expo demo:

  1. Create project: npx create-expo-app [demo-name] --template blank-typescript
  2. Install core dependencies: pnpm add expo-router expo-image expo-haptics react-native-reanimated react-native-gesture-handler react-native-safe-area-context @gorhom/​bottom-sheet @shopify/​flash-list lucide-react-native nativewind tailwindcss@3
  3. Configure NativeWind (see nativewind skill)
  4. Set up root layout with provider stack
  5. Configure app.json with scheme, name, splash
  6. Add route groups and screens
  7. Run: pnpm start (Expo dev server)

Adding a new library:

  1. Install with pnpm: pnpm add [library]
  2. Check if Expo config plugin needed in app.json
  3. Rebuild dev client if native module added: npx expo prebuild

Guidance

app.json Configuration

Key fields for demo apps:

FieldPurpose
expo.nameDisplay name
expo.slugURL-safe identifier
expo.schemeDeep link scheme (e.g., myapp)
expo.orientationportrait (default for demos)
expo.splashSplash screen configuration
expo.ios.bundleIdentifieriOS bundle ID
expo.android.packageAndroid package name
expo.pluginsExpo config plugins (e.g., expo-router)

Root Layout Provider Pattern

The root app/​_layout.tsx wraps the entire app with providers. Standard order:

GestureHandlerRootView (flex: 1)
  └── SafeAreaProvider
       └── ThemeProvider / Context
            └── Stack (Expo Router)
  • GestureHandlerRootView must be outermost (required by gesture handler and bottom sheets)
  • SafeAreaProvider provides safe area insets to all descendants
  • App-level context providers go between SafeAreaProvider and Stack
  • <Stack screenOptions={{ headerShown: false }} /> for custom headers

expo-image (replaces RN Image)

Use expo-image for all image rendering — provides caching, blurhash placeholders, content-fit modes, and animated transitions.

Key props:

  • source — URI string or require() for local images
  • placeholder — blurhash string for loading state
  • contentFit — 'cover' | 'contain' | 'fill'
  • transition — fade-in duration in ms (e.g., 300)

expo-haptics

Provide tactile feedback on interactions:

  • Haptics.selectionAsync() — light tap for selections, toggles
  • Haptics.impactAsync(ImpactFeedbackStyle.Medium) — button press, card tap
  • Haptics.notificationAsync(NotificationFeedbackType.Success) — action completion

Use sparingly — haptics on every touch is annoying.

Safe Area Insets

Account for device notch, status bar, and home indicator:

  • useSafeAreaInsets() — returns { top, bottom, left, right } in points
  • Apply to screen containers: paddingTop: insets.top
  • NativeWind classes: use pt-[${insets.top}px] or wrap in SafeAreaView

@gorhom/​bottom-sheet

Replaces Radix Dialog for mobile modal patterns:

  • Use for detail views, selections, filters, forms
  • Define snap points: snapPoints={['25%', '50%', '90%']}
  • Backdrop: backdropComponent with press-to-dismiss
  • BottomSheetScrollView for scrollable content inside sheets
  • Requires GestureHandlerRootView as ancestor

FlashList (replaces FlatList)

High-performance list rendering from @shopify/​flash-list:

  • Drop-in FlatList replacement with mandatory estimatedItemSize prop
  • estimatedItemSize={80} — estimated height of each item in points
  • Recycling architecture for smooth 60fps scrolling
  • Use contentContainerClassName for NativeWind styling

lucide-react-native

Icon library for React Native (matches web lucide-react):

  • Import individual icons: import { Home, Settings, ChevronRight } from 'lucide-react-native'
  • Props: size, color, strokeWidth
  • Consistent icon set across mobile and web codebases

StatusBar

Configure status bar appearance per screen:

  • <StatusBar style="dark" /> for light backgrounds
  • <StatusBar style="light" /> for dark backgrounds
  • Import from expo-status-bar

Best Practices

  • Wrap root layout in GestureHandlerRootView with style={{ flex: 1 }}
  • Use expo-image for all images (caching, blurhash, performance)
  • Add haptics to primary actions only (buttons, major selections) — not every touch
  • Set estimatedItemSize on all FlashList components
  • Place providers in root _layout.tsx, not in individual screens
  • Use useSafeAreaInsets() for manual padding, SafeAreaView for simple wrapping
  • Test on real device for haptics and performance verification

Anti-Patterns

  • Using React Native Image instead of expo-image
  • Using FlatList for large datasets instead of FlashList
  • Forgetting GestureHandlerRootView (causes bottom sheet and gesture crashes)
  • Overusing haptics on every interaction
  • Hardcoding status bar height instead of using safe area insets
  • Missing estimatedItemSize on FlashList (required prop, console warning)
  • Placing SafeAreaView inside ScrollView (causes layout issues)
  • Not including expo-router plugin in app.json plugins array

More skills from majiayu000

xiaohongshu logo
majiayu000/claude-arsenal

xiaohongshu

xiaohongshu

286 148
View
agent-task-conductor logo
majiayu000/claude-skill-registry

agent-task-conductor

Conduct multi-agent task orchestration and workflow coordination.

663 1
View
conductor-setup logo
majiayu000/claude-skill-registry

conductor-setup

Initialize project with Conductor artifacts (product definition,

663 1
View
animation-designer logo
majiayu000/claude-skill-registry

animation-designer

Expert in web animations, transitions, and motion design using Framer Motion and CSS

663 1
View
diagramming logo
majiayu000/claude-skill-registry

diagramming

Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...

663 1
View
h3-pg logo
majiayu000/claude-skill-registry-data

h3-pg

PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.

23 1
View
conductor-development logo
majiayu000/claude-skill-registry

conductor-development

Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...

663 1
View
conductor-status logo
majiayu000/claude-skill-registry

conductor-status

Display project status, active tracks, and next actions

663 1
View
dockerization logo
majiayu000/claude-skill-registry

dockerization

Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.

663 1
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View