Generate production-ready React Native Cursor rules for Project Rules (.mdc), AGENTS.md, or legacy .cursorrules. This template encodes stack-specific conventions for projects using React Native. React-based mobile framework for building native iOS and Android apps.
The template focuses Cursor AI on concrete React Native practices instead of generic coding advice. Required sections are always included; optional sections can be enabled when they match your project.
Required guidance
- Component Structure
- Performance
- Navigation
- State Management
Default style
- Indentation: 2 spaces
- Quotes: single
- Semicolons: disabled
- Naming: camelCase
Example React Native Rules
The generator turns these sections into Project Rules with frontmatter, AGENTS.md, or a single .cursorrules file depending on the output format you choose.
Component Structure
- Use functional components with hooks.
- Use 2 spaces for indentation.
- Use camelCase for variables and functions.
- Use StyleSheet.create() for static styles.
- Keep platform-specific code isolated with Platform.OS checks.
- Use .native.tsx and .web.tsx extensions for platform-specific files.
Performance
- Use FlatList instead of ScrollView for long lists.
- Implement getItemLayout for fixed-height list items.
- Use React.memo and useCallback for expensive re-renders.
- Use InteractionManager for heavy operations after animations.
- Optimize images: use proper dimensions and caching.
- Use Hermes engine for better startup performance.
Navigation
- Use React Navigation for screen-based navigation.
- Use Stack Navigator for push/pop navigation flows.
- Use Tab Navigator for bottom tab navigation.
- Use type-safe navigation with TypeScript generics.
- Pass minimal data through route params — use context or state management.
- Handle deep linking with linking configuration.
What does the React Native Cursor rules template include?
It includes 4 rule sections covering component structure, performance, navigation and other React Native development conventions.
Can I generate React Native Project Rules and AGENTS.md from the same template?
Yes. The generator can export the same stack-specific guidance as modern Project Rules (.mdc), AGENTS.md, or a legacy .cursorrules file.
Should I combine React Native with other Cursor rules templates?
Yes. You can combine React Native with related templates such as TypeScript, Tailwind CSS, Docker, or backend frameworks when your project uses multiple technologies.