Expo React Native JavaScript Best Practices — Cursor Rules | Neura Market
    Neura MarketNeura Market/Cursor
    ChatGPTChatGPTClaudeClaudeGeminiGeminiCursorCursorGrokGrokPerplexityPerplexityDeepSeekDeepSeek
    CoPilotCoPilotStable DiffusionStable DiffusionMidjourneyMidjourney
    View All Directories
    OverviewRulesPromptsMCPsAgentsBlogVideosGuidesCoursesCommunityExtensionsTrendingGenerate
    CursorRulesExpo React Native JavaScript Best Practices
    Back to Rules
    Frontend

    Expo React Native JavaScript Best Practices

    April 15, 2026
    17,001 copies 0 downloads

    Code Style and Structure:

    Rule Content
    You are an expert in JavaScript, React Native, Expo, and Mobile UI development.
      
      Code Style and Structure:
      - Write Clean, Readable Code: Ensure your code is easy to read and understand. Use descriptive names for variables and functions.
      - Use Functional Components: Prefer functional components with hooks (useState, useEffect, etc.) over class components.
      - Component Modularity: Break down components into smaller, reusable pieces. Keep components focused on a single responsibility.
      - Organize Files by Feature: Group related components, hooks, and styles into feature-based directories (e.g., user-profile, chat-screen).
    
      Naming Conventions:
      - Variables and Functions: Use camelCase for variables and functions (e.g., isFetchingData, handleUserInput).
      - Components: Use PascalCase for component names (e.g., UserProfile, ChatScreen).
      - Directories: Use lowercase and hyphenated names for directories (e.g., user-profile, chat-screen).
    
      JavaScript Usage:
      - Avoid Global Variables: Minimize the use of global variables to prevent unintended side effects.
      - Use ES6+ Features: Leverage ES6+ features like arrow functions, destructuring, and template literals to write concise code.
      - PropTypes: Use PropTypes for type checking in components if you're not using TypeScript.
    
      Performance Optimization:
      - Optimize State Management: Avoid unnecessary state updates and use local state only when needed.
      - Memoization: Use React.memo() for functional components to prevent unnecessary re-renders.
      - FlatList Optimization: Optimize FlatList with props like removeClippedSubviews, maxToRenderPerBatch, and windowSize.
      - Avoid Anonymous Functions: Refrain from using anonymous functions in renderItem or event handlers to prevent re-renders.
    
      UI and Styling:
      - Consistent Styling: Use StyleSheet.create() for consistent styling or Styled Components for dynamic styles.
      - Responsive Design: Ensure your design adapts to various screen sizes and orientations. Consider using responsive units and libraries like react-native-responsive-screen.
      - Optimize Image Handling: Use optimized image libraries like react-native-fast-image to handle images efficiently.
    
      Best Practices:
      - Follow React Native's Threading Model: Be aware of how React Native handles threading to ensure smooth UI performance.
      - Use Expo Tools: Utilize Expo's EAS Build and Updates for continuous deployment and Over-The-Air (OTA) updates.
      - Expo Router: Use Expo Router for file-based routing in your React Native app. It provides native navigation, deep linking, and works across Android, iOS, and web. Refer to the official documentation for setup and usage: https://docs.expo.dev/router/introduction/

    Tags

    exporeact nativejavascriptexpo-routerreact-navigationreact-native-gesture-handlerreact-native-reanimatedreact-native-responsive-screenreact-native-fast-image

    Comments

    More Rules

    View all
    Web Development

    Next.js 15 + TypeScript Cursor Rules

    Comprehensive .cursorrules file for Next.js 15 App Router projects with TypeScript, enforcing server components by default, proper use of "use client" directive, and App Router conventions.

    C
    Community
    Backend Development

    Python FastAPI Best Practices Rules

    Cursor rules for Python FastAPI projects enforcing async patterns, Pydantic v2 models, dependency injection, and proper error handling.

    C
    Community
    Frontend Development

    React + TypeScript Component Rules

    Rules for consistent React component development with TypeScript interfaces, proper hook patterns, and component composition.

    C
    Community
    AI/ML

    Cursor Agent Mode Configuration

    Rules optimizing Cursor Agent mode behavior including multi-file editing context, session management, and autonomous task completion patterns.

    C
    Cursor Team
    Frontend Development

    Tailwind CSS + shadcn/ui Rules

    Cursor rules for projects using Tailwind CSS with shadcn/ui component library, enforcing consistent utility class usage and component patterns.

    C
    Community
    Backend Development

    Go Backend Service Rules

    Rules for Go backend services enforcing idiomatic Go patterns, proper error handling, and clean architecture conventions.

    C
    Community

    Stay up to date

    Get the latest Cursor prompts, rules, and resources delivered to your inbox weekly.

    Neura Market LogoNeura Market

    Discover the best AI prompts, plugins, and resources for Cursor and more.

    Content Types

    • Rules
    • Prompts
    • MCPs
    • Agents
    • Guides

    Platforms

    • ChatGPT Directory
    • Claude Directory
    • Gemini Directory
    • Cursor Directory
    • Grok Directory
    • Perplexity Directory
    • DeepSeek Directory
    • CoPilot Directory
    • Stable Diffusion Directory
    • Midjourney Directory
    • All Directories

    Resources

    • Blog
    • Documentation
    • Help Center
    • Marketplace

    Legal

    • Privacy Policy
    • Terms of Service

    © 2026 Neura Market. All rights reserved.

    |

    Not affiliated with any AI platform vendors.