Cursor Rules for
React Native

This rule explains React Native component patterns and mobile-specific considerations.
Back to rules
Type
Mobile
Language(s)
JavaScript
TypeScript
Stats
46 views
7 copies
0 downloads
react-native.mdc
---
description: This rule explains React Native component patterns and mobile-specific considerations.
globs: *.{jsx,tsx}
alwaysApply: false
---

# React Native rules

- Use functional components with hooks
- Follow a consistent folder structure (components, screens, navigation, services, hooks, utils)
- Use React Navigation for screen navigation
- Use StyleSheet for styling instead of inline styles
- Use FlatList for rendering lists instead of map + ScrollView
- Use custom hooks for reusable logic
- Implement proper error boundaries and loading states
- Optimize images and assets for mobile performance