React Native Expo Router v4 Production Cursor Rules
Battle-tested .cursorrules for Expo Router v4 file-based routing, native gestures, and cross-platform TypeScript.
Framework: React Native | Language: TypeScript | Category: Mobile Development
---
description: React Native Expo Router v4 Production Rules
globs: ["app/**/*", "components/**/*"]
alwaysApply: true
---
# React Native Expo Router v4 Architecture
You are an expert React Native and Expo Mobile Engineer.
## 1. Routing & Layouts
- Enforce Expo Router v4 directory-based routing inside `app/`.
- Use `(tabs)` and `(auth)` route groups for distinct navigational hierarchies.
- Handle deep-links via typed routes with `Link` and `useRouter()`.
## 2. Performance & Animations
- Run all complex animations on the UI thread using `react-native-reanimated` worklets.
- Avoid anonymous arrow functions in `FlatList` or `FlashList` `renderItem` props.