Skip to content
Cursor Rules Generator
Mobile4 sections

React Native Cursor Rules Template

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 Complete React Native Cursor Rules

The full rule set in all three formats Cursor understands — copy the one your project uses. Project Rules (.mdc) load per-file via globs, AGENTS.md is portable across AI tools, and .cursorrules is the legacy single-file format.

Replacing a legacy file? Read the guide to migrate .cursorrules to Cursor Project Rules (.mdc) before copying this template into your project.

.cursor/rules/react-native-rn-component-structure.mdc
---
description: "Component Structure"
alwaysApply: false
---
- Use functional components with hooks.
- Use    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.
.cursor/rules/react-native-rn-performance.mdc
---
description: "Performance"
alwaysApply: false
---
- 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.
.cursor/rules/react-native-rn-navigation.mdc
---
description: "Navigation"
alwaysApply: false
---
- 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.
.cursor/rules/react-native-rn-state-management.mdc
---
description: "State Management"
alwaysApply: false
---
- Use React Context for simple shared state.
- Use Zustand or Redux Toolkit for complex global state.
- Use React Query (TanStack Query) for server state.
- Use MMKV for fast local key-value storage.
- Persist important state with AsyncStorage or MMKV.
- Handle app state changes (foreground/background) with AppState API.

Customize These Rules

The generator below is preloaded with the React Native template. Adjust indentation, quotes, naming, add your own rules, then download — no need to start from scratch on the homepage.

What This Template Covers

Required guidance

  • - Component Structure
  • - Performance
  • - Navigation
  • - State Management

Default style

  • - Indentation: 2 spaces
  • - Quotes: single
  • - Semicolons: disabled
  • - Naming: camelCase

Frequently Asked Questions

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.