React Native .cursorrules prompt file
About .cursorrules prompt file
What you can build
React Native E-Commerce App: Create a user-friendly e-commerce platform using React Native, with well-organized components for products, cart, and checkout. Utilize responsive design techniques and optimize state management for a seamless shopping experience.
Task Management App: Develop a cross-platform task manager app with React Native, utilizing functional components and hooks. Implement features like task categorization and due date reminders, with a focus on responsive and consistent styling.
Healthy Lifestyle Tracker: Build a lifestyle app to track activities, meals, and workouts using Expo. Use optimized image handling for food and activity tracking, ensure responsive design for data visualization, and implement deep linking for quick user navigation.
Social Networking Platform: Construct a social networking app with separate modules for user profiles, messaging, and notifications. Leverage ES6+ features and optimize list rendering to offer swift navigation and smooth transitions.
Event Management Application: Design an app to organize and promote events, including ticket sales and attendee management. Use FlatList optimization for handling guest lists and responsive design to accommodate various mobile devices.
Educational Quiz App: Create an interactive quiz application with React Native, focusing on component modularity. Incorporate animations for question transitions and use memoization techniques to enhance performance during quizzes.
Travel Companion App: Develop a travel app providing itineraries, booking options, and weather updates, leveraging Expo's OTA updates for real-time changes. Optimize image handling for displaying high-quality travel photos and maps efficiently.
Fitness Tracking Application: Design a fitness app that tracks user activities with real-time feedback. Use a consistent styling approach for displaying statistics and implement React Native's responsive design features for improved user experience.
Cooking Recipe Platform: Build a comprehensive cooking app, showcasing various recipes with ingredient listings and preparation steps. Employ optimization strategies to manage state and component rendering for recipe searches.
News Aggregator App: Create a news app with a focus on modularity and responsive styling. Use optimized state management to handle data fetching and updates from multiple news sources in real-time.
Benefits
- Promote Modular Development: Emphasizes component modularity and feature-based file organization, enhancing code maintenance and scalability.
- Optimize Performance: Offers specific suggestions like memoization and FlatList optimization to enhance application performance.
- Comprehensive Naming Conventions: Clearly defined rules for naming variables, functions, components, and directories, ensuring code consistency.
Synopsis
This prompt is ideal for mobile developers enhancing their React Native apps, enabling them to build clean, efficient, and well-structured applications leveraging hooks, functional programming, and performance optimizations.
Overview of .cursorrules prompt
The .cursorrules file provides guidelines for developing mobile applications using JavaScript, React Native, and Expo. It emphasizes clean and readable code, advocating for the use of functional components with hooks over class components. The file outlines organizational strategies such as grouping files by features and using consistent naming conventions. It suggests using ES6+ features and PropTypes for type checking. To enhance performance, it recommends optimizing state management and using techniques like memoization and FlatList optimization. The file also highlights UI and styling practices, such as using StyleSheet.create() for styling and optimizing image handling. Additionally, it advises following React Native's threading model and utilizing Expo tools for building and deployment, including Expo Router for routing.