cursor-rules / rules
Cursor rule8 starsChanged 19 months agoMITView on GitHub
React Native Development Standards
Where files are headingNew Cursor rule files have more rules about planning and tracking tasks, and fewer about code style.
Of the Cursor rule files we read, the 1,533 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository17 other files it gives its agents.
- .cursor/rules/aws-bedrock.mdcCursor rule
- .cursor/rules/aws-cloudformation.mdcCursor rule
- .cursor/rules/aws-dynamodb.mdcCursor rule
- .cursor/rules/aws-eventbridge.mdcCursor rule
- .cursor/rules/aws-gamelift.mdcCursor rule
- .cursor/rules/aws-iam.mdcCursor rule
- .cursor/rules/aws-lambda.mdcCursor rule
- .cursor/rules/aws-sagemaker.mdcCursor rule
- .cursor/rules/aws-sam.mdcCursor rule
- .cursor/rules/aws-vpc.mdcCursor rule
- .cursor/rules/base.mdcCursor rule
- .cursor/rules/docs-structure.mdcCursor rule
- .cursor/rules/expo.mdcCursor rule
- .cursor/rules/nextjs.mdcCursor rule
- .cursor/rules/react.mdcCursor rule
- .cursor/rules/readme-documentation.mdcCursor rule
- .cursor/rules/typescript.mdcCursor rule
The file
Show its rules and text
We split this react-native.mdc into the rules it gives an agent
64 rules. About 0 are common, 64 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈64
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 16
Use TypeScript for type safety
- Distinctive: line 19
Use Expo for simpler projects and React Native CLI for complex requirements
- Distinctive: line 23
Use React Native New Architecture where applicable
- Distinctive: line 28
Create reusable hooks for shared logic
- Distinctive: line 30
Use proper navigation structure
- Distinctive: line 31
Create dedicated styles directory
- Distinctive: line 36
Use functional components with hooks
- Distinctive: line 37
Create small, reusable UI components
- Distinctive: line 39
Use proper prop validation with TypeScript
- Distinctive: line 40
Create presentational vs container components
- Distinctive: line 42
Use memo for expensive renders
- Distinctive: line 43
Create proper component documentation
- Distinctive: line 46
Use React Navigation as the primary navigation library
- Distinctive: line 48
Create logical navigation hierarchy
- Distinctive: line 51
Create reusable navigation patterns
- Distinctive: line 56
Use StyleSheet.create for styles
- Distinctive: line 58
Create responsive layouts with flexbox
- Distinctive: line 62
Use style composition for complex UIs
- Distinctive: line 66
Use React Context for shared state
- Distinctive: line 68
Use local state for component-specific state
- Distinctive: line 71
Create middleware for side effects
- Distinctive: line 72
Use proper state normalization
- Distinctive: line 76
Use FlatList for long lists
- Distinctive: line 78
Use memo and useCallback for expensive operations
- Distinctive: line 81
Use Hermes engine for improved performance
- Distinctive: line 86
Use React Query or SWR for data fetching
- Distinctive: line 89
Create retry mechanisms for failed requests
- Distinctive: line 92
Use proper authentication in requests
- Distinctive: line 96
Use Formik or React Hook Form for forms
- Distinctive: line 98
Create reusable form components
- Distinctive: line 101
Create accessible form controls
- Distinctive: line 102
Use proper keyboard handling
- Distinctive: line 106
Create proper TypeScript definitions for native modules
- Distinctive: line 109
Create fallbacks for unsupported features
- Distinctive: line 111
Document native module usage
- Distinctive: line 112
Create proper testing for native modules
- Distinctive: line 116
Use Animated API for simple animations
- Distinctive: line 120
Use proper gesture handling
- Distinctive: line 121
Create reusable animation hooks
- Distinctive: line 123
Test animations across devices
- Distinctive: line 126
Write unit tests for business logic
- Distinctive: line 127
Create component tests with React Native Testing Library
- Distinctive: line 129
Test across multiple device sizes
- Distinctive: line 131
Create test fixtures for common scenarios
- Distinctive: line 137
Create proper focus order
- Distinctive: line 138
Use proper color contrast
- Distinctive: line 140
Test with VoiceOver and TalkBack
- Distinctive: line 141
Create proper touch targets
- Distinctive: line 147
Create universal links for iOS
- Distinctive: line 150
Create deep link testing infrastructure
- Distinctive: line 151
Document deep link structure
- Distinctive: line 153
Create fallbacks for unsupported deep links
- Distinctive: line 160
Create offline-aware UI components
- Distinctive: line 162
Test offline scenarios thoroughly
- Distinctive: line 168
Create proper code signing
- Distinctive: line 170
Use proper versioning strategies
- Distinctive: line 171
Create proper release notes
- Distinctive: line 177
Create secure storage for sensitive data
- Distinctive: line 178
Use HTTPS for all network requests
- Distinctive: line 180
Create proper obfuscation for sensitive code
- Distinctive: line 182
Create security testing procedures
- Distinctive: line 186
Use Expo Updates or CodePush for OTA updates
- Distinctive: line 188
Create staged rollout strategies
- Distinctive: line 191
Create proper monitoring for updates
≈ “Common” is an estimate: at least 1 in 5 of the 3,030 Cursor rule files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
--- description: React Native Development Standards globs: alwaysApply: false --- --- Description: React Native Development Standards Globs: **/*.tsx, **/*.ts, **/screens/**/*, **/components/**/*, **/App.tsx --- # React Native Development Standards @base.mdc @typescript.mdc ## Project Setup - Use TypeScript for type safety - Implement ESLint and Prettier for code quality - Set up proper directory structure for scalability - Use Expo for simpler projects and React Native CLI for complex requirements - Configure proper module resolution - Implement proper environment configuration - Set up proper testing infrastructure - Use React Native New Architecture where applicable ## Directory Structure - Organize by feature or domain - Separate UI components from business logic - Create reusable hooks for shared logic - Implement services for API interactions - Use proper navigation structure - Create dedicated styles directory - Organize assets efficiently - Implement proper type definitions ## Component Architecture - Use functional components with hooks - Create small, reusable UI components - Implement proper component composition - Use proper prop validation with TypeScript - Create presentational vs container components - Implement pure components for performance - Use memo for expensive renders - Create proper component documentation ## Navigation - Use React Navigation as the primary navigation library - Implement type-safe navigation - Create logical navigation hierarchy - Handle deep linking properly - Implement proper screen transitions - Create reusable navigation patterns - Handle authentication flows in navigation - Implement proper error boundaries ## Styling - Use StyleSheet.create for styles - Implement consistent theming - Create responsive layouts with flexbox - Use dimension-aware styling - Implement proper dark mode support - Create accessibility-friendly styles - Use style composition for complex UIs - Implement proper RTL support ## State Management - Use React Context for shared state - Implement Redux or Zustand for complex state - Use local state for component-specific state - Leverage React Query for server state - Implement proper persistence for offline support - Create middleware for side effects - Use proper state normalization - Implement performance-optimized selectors ## Performance Optimization - Use FlatList for long lists - Implement proper list item recycling - Use memo and useCallback for expensive operations - Optimize image loading and caching - Implement lazy loading for non-critical components - Use Hermes engine for improved performance - Optimize JavaScript bundle size - Implement proper native module optimization ## Data Fetching - Use React Query or SWR for data fetching - Implement proper caching strategies - Handle offline data synchronization - Create retry mechanisms for failed requests - Implement proper loading states - Handle errors gracefully - Use proper authentication in requests - Implement pagination for large datasets ## Form Handling - Use Formik or React Hook Form for forms - Implement proper validation with Yup or Zod - Create reusable form components - Handle form submission properly - Implement proper error handling - Create accessible form controls - Use proper keyboard handling - Implement form persistence when appropriate ## Native Module Integration - Create proper TypeScript definitions for native modules - Implement cross-platform compatibility - Handle permissions properly - Create fallbacks for unsupported features - Implement proper error handling - Document native module usage - Create proper testing for native modules - Optimize native module performance ## Animation - Use Animated API for simple animations - Leverage Reanimated for complex animations - Create declarative animations - Implement performant animations - Use proper gesture handling - Create reusable animation hooks - Optimize animations for performance - Test animations across devices ## Testing - Write unit tests for business logic - Create component tests with React Native Testing Library - Implement end-to-end tests with Detox or Maestro - Test across multiple device sizes - Implement proper mocks for native modules - Create test fixtures for common scenarios - Test accessibility features - Implement visual regression testing ## Accessibility - Implement proper accessibility labels - Create proper focus order - Use proper color contrast - Implement screen reader support - Test with VoiceOver and TalkBack - Create proper touch targets - Implement proper keyboard navigation - Document accessibility features ## Deep Linking - Implement proper deep link handling - Create universal links for iOS - Implement app links for Android - Handle deep link parameters properly - Create deep link testing infrastructure - Document deep link structure - Implement proper deep link analytics - Create fallbacks for unsupported deep links ## Offline Support - Implement proper data persistence - Create offline-first architecture - Handle connectivity changes gracefully - Implement proper conflict resolution - Create offline-aware UI components - Implement proper sync mechanisms - Test offline scenarios thoroughly - Document offline capabilities ## CI/CD - Set up proper CI/CD pipelines - Implement automated testing - Create proper code signing - Implement automated deployments - Use proper versioning strategies - Create proper release notes - Implement beta testing distribution - Set up proper monitoring ## Security - Implement proper authentication flows - Create secure storage for sensitive data - Use HTTPS for all network requests - Implement certificate pinning when needed - Create proper obfuscation for sensitive code - Implement proper permission handling - Create security testing procedures - Document security features ## Code Pushing - Use Expo Updates or CodePush for OTA updates - Implement proper versioning for updates - Create staged rollout strategies - Implement proper fallback mechanisms - Test updates thoroughly - Create proper monitoring for updates - Document update procedures - Implement proper user communication for updates
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

