react native expo
via PatrickJS/awesome-cursorrules
Best practices and structure for React Native Expo development.
What is react native expo?
Provides guidance for building React Native apps with Expo, covering functional components, navigation, asset management, and Expo SDK features. Use this rule when starting or maintaining Expo projects to ensure consistent patterns and leverage Expo's built-in capabilities.
- Use functional components with hooks and TypeScript for type safety
- Implement navigation with Expo Router and organize code into components, screens, and hooks folders
- Leverage Expo SDK features including asset system, vector icons, push notifications, and OTA updates
- Apply proper error handling, crash reporting, and offline support patterns
- Use StyleSheet for styling and Expo's secure store for sensitive data
- Follow React Native performance best practices
Applies to
File patterns this rule matches.
Rule definition (reference)
Source of truth, from the repository.
// React Native Expo .cursorrules
// React Native Expo best practices
const reactNativeExpoBestPractices = [ "Use functional components with hooks", "Utilize Expo SDK features and APIs", "Implement proper navigation using Expo Router", "Use Expo's asset system for images and fonts", "Implement proper error handling and crash reporting", "Utilize Expo's push notification system", ];
// Folder structure
const folderStructure = assets/ src/ components/ screens/ navigation/ hooks/ utils/ App.js app.json;
// Additional instructions
const additionalInstructions = `
- Use TypeScript for type safety
- Implement proper styling using StyleSheet
- Utilize Expo's vector icons
- Use Expo's secure store for sensitive data
- Implement proper offline support
- Follow React Native best practices for performance
- Use Expo's OTA updates for quick deployments `;
Related rules
React Native Expo Router with TypeScript and Windows development setup.
Expert React & Next.js App Router development with clear, production-ready code.
React Query integration patterns and best practices for React development.
React + Redux + TypeScript integration with hooks, Redux Toolkit, and type-safe patterns.
React Router v7 framework mode patterns for loaders, actions, route modules, and progressive enhancement.
React development with Styled Components integration and best practices.
