RunPrompt Pro
cursor Mobile Engineering
β˜… 4.98 (6.120 uses)

React Native & Expo Router Mobile App Production (.cursorrules)

Stops Cursor from generating legacy class components, obsolete React Navigation boilerplate, or memory-leaking animation loops on iOS and Android.

Verified for 2026 Engine Updates β€’ Last Updated: 2026-10-31

Parametric Customizer & Compiler Live Tool

Adjust the variables below. The prompt code and API payload update dynamically in real time.

6120 uses

Directs Cursor on how to structure component styles.

Chooses high-speed storage engines that avoid thread blocking.

Ready-to-Run Compiled Prompt
0 words β€’ 0 tokens β€’ Est: <$0.0001
# CURSOR RULES FOR REACT NATIVE & EXPO (NEW ARCHITECTURE)

You are a Principal Mobile Architect specialized in React Native, Expo Router, TypeScript, and NativeWind v4.

### TECH STACK REQUIREMENTS:
- Framework: Expo with Expo Router (file-based navigation under `/app`)
- Architecture: React Native New Architecture (Bridgeless + TurboModules enabled)
- Styling: NativeWind v4 (Tailwind CSS for React Native with compile-time CSS)
- Animations: React Native Reanimated 3 (worklet-driven UI thread animations)
- State & Storage: Zustand with react-native-mmkv (100x faster synchronous key-value storage)
- Gestures: react-native-gesture-handler

### CRITICAL MOBILE CONSTRAINTS:
1. **Performance & 120Hz Fluidity**:
   - NEVER trigger state updates inside 60/120fps gesture loops. Use `useSharedValue` and `useAnimatedStyle`.
   - Use `@shopify/flash-list` instead of standard `FlatList` for long scrollable lists.
   - Always specify `contentContainerStyle` for scrollable views, avoiding nested unconstrained ScrollViews.

2. **Platform Parity (iOS vs Android)**:
   - Enforce safe area handling via `react-native-safe-area-context`.
   - Account for Android hardware back button and navigation bars.
   - Never use Web-only APIs (e.g. `window.localStorage`, `document.querySelector`).

3. **Navigation & Deep Linking**:
   - Use typed routes with Expo Router's `useRouter()` and `<Link href="..." />`.
   - Modularize reusable components into `/components` and custom hooks into `/hooks`.
Build Mobile Apps in Cursor (Free)

Code React Native apps with multi-file refactoring and lightning intelligence.

⚑
Featured AI Partner Verified

Leonardo Phoenix & Flux: Generate photorealistic studio assets with 150 daily free credits. Zero setup required.

πŸ“Έ Real Sample Outputs & Verified Results

Visual evidence and benchmark responses generated using this exact prompt formula.

### Example Reanimated 3 Gesture Card with NativeWind: ```tsx import React from 'react'; import { Text, Pressable } from 'react-native'; import Animated, { useSharedValue, useAnimatedStyle, withSpring } from 'react-native-reanimated'; export function BouncyCard({ title, onPress }: { title: string; onPress: () => void }) { const scale = useSharedValue(1); const animatedStyle = useAnimatedStyle(() => ({ transform: [{ scale: scale.value }], })); return ( <Pressable onPressIn={() => (scale.value = withSpring(0.96))} onPressOut={() => (scale.value = withSpring(1))} onPress={onPress} > <Animated.View style={animatedStyle} className="bg-surface-850 p-5 rounded-2xl border border-surface-750 shadow-md active:border-brand-500" > <Text className="text-white font-bold text-base">{title}</Text> </Animated.View> </Pressable> ); } ```
Reanimated 3 gesture spring card running completely on the UI thread.

πŸ”¬ Prompt Engineering Anatomy

Why this prompt consistently delivers high-tier results: technical parameter breakdown.

1 Enforced @shopify/flash-list over FlatList

Standard FlatList creates massive bridge traffic and blank white tiles during rapid scrolling. FlashList recycles views for seamless 120fps scrolling.

PRO TIP: Always provide `estimatedItemSize` to FlashList for optimal recycling performance.
2 react-native-mmkv synchronous storage directive

Standard AsyncStorage is asynchronous and adds perceptible delay to initial app launch. MMKV operates synchronously via C++ JSI.

PRO TIP: Store user authentication tokens and theme preferences directly in MMKV.

πŸ’¬ Frequently Asked Questions

Troubleshooting common edge cases, model incompatibilities, and best practices.

Can I use this with Expo Go?

Yes, unless you use native C++ libraries that require Expo Prebuild / Development Builds.

Does this work in Windsurf or Copilot?

Yes! Works across all AI code editors supporting custom instruction rules.

Explore Related AI Coding & Rulesets Prompts View all β†’

πŸš€ Community Showcase

Submit Your Proven AI Prompt

Share your best prompt formula. Approved prompts get featured on RunPrompt with a backlink to your profile or website!

Prompts & Generative Tools
flux Cyberpunk Tokyo Streetwear Character Portrait Generator
Character & Fashion Concepts
claude ATS-Proof Executive Resume & Metric-Driven CV Rewrite Prompt
Career & Executive Growth
deepseek DeepSeek R1 Architecture & Security Vulnerability Code Auditor
AI Coding & Rulesets
cursor Cursor AI (.cursorrules) for Next.js 15, React 19 & Tailwind CSS
AI Coding & Rulesets
midjourney Luxury Perfume Studio Product Photography Prompt Generator
E-Commerce & Product Mockups
chatgpt High-Converting B2B SaaS Landing Page Copy Mega-Prompt
Direct Response Copywriting
cursor FastAPI, PostgreSQL & Supabase Production (.cursorrules)
AI Coding & Rulesets
flux Cinematic AI Video Camera Movement & Motion Generator
AI Video & Camera Motion
midjourney Minimalist 3D Claymorphic iOS App Icon & Logo Generator
Logos & App Icons
claude Viral Twitter / X Long-Form Educational Thread Architect
Social Media & Viral Growth
midjourney Malibu Oceanfront Brutalist Luxury Villa Architectural Digest Render
Architecture & Interior Design
cursor React Native & Expo Router Mobile App Production (.cursorrules)
AI Coding & Rulesets
claude 2026 Google AI Overviews & Semantic Entity Cluster Architecture Mega-Prompt
Search Strategy & Semantic SEO
midjourney Amazon A+ Content & Shopify Lifestyle Product Mockup Generator
E-Commerce & Amazon A+
deepseek Solidity Smart Contract Reentrancy & Flash Loan Attack Auditor
Blockchain & Smart Contracts
claude Hyper-Personalized B2B Cold Email Sequence with 40%+ Open Rates
B2B Sales & Cold Outreach
flux Invisible Ghost Mannequin Apparel & Fashion Mockup Generator
Fashion & Ghost Mannequin
flux Surreal Seamless Morphing & Physics Transformation Video Prompt
AI Video & Camera Motion
↑ ↓ Navigate ↡ Select
RunPrompt Spotlight
πŸ•’

Recent Generations

Your last 10 customized prompts generated in this session. Saved privately in your browser.

No recent prompts yet. Customize and copy any prompt to see your history here!
0 items stored