Skip to content

TypeScript Expo Jest Detox .cursorrules prompt file

Author: İlknur Ültanır

What you can build

React Native Starter Kit for Expo: Create a starter template for React Native projects using Expo that includes pre-configured modules for state management with React Context, navigation with react-navigation, styling with styled-components, and authentication with a common identity provider.Accessibility Checker for React Native Apps: Develop a tool or plugin that scans React Native apps to ensure they meet high accessibility standards, providing suggestions for ARIA roles, native accessibility props, and layout adjustments.Performance Optimization Service for Expo Apps: Offer a service to analyze and optimize the performance of Expo apps, focusing on reducing re-renders, optimizing images, and enhancing startup times using lazy loading techniques and memoization strategies.TypeScript Snippet Library for React Native Developers: Build a collection of TypeScript code snippets specifically for React Native development, fostering the use of functional programming patterns and providing examples of effective use of Context API, custom hooks, and reducer patterns.Expo-responsive Design Tool: Create a Figma plugin or online tool that allows designers to preview Expo-based mobile app designs across different screen sizes and orientations, facilitating responsive design implementation with Flexbox and useWindowDimensions.Zod Schema Generator for API Validation: Develop a tool that auto-generates Zod schemas from OpenAPI or Swagger documentation to provide seamless runtime validation and error handling in React Native projects using TypeScript.Dark Mode Theme Manager for Expo Apps: Design a package or library that provides an easy setup for dark mode support in Expo apps, allowing developers to switch themes dynamically and providing a set of customizable components with useColorScheme integration.React Native Animation Library using Reanimated: Build a library of pre-built animations and gestures using react-native-reanimated and react-native-gesture-handler, enabling developers to easily add performant animations to their apps.Expo Link Tester Tool: Construct a web app that allows developers to test deep linking and universal linking configurations for their React Native apps, ensuring proper routing and navigation with expo-linking.React Native Secure Data Storage Solution: Create a library or service leveraging react-native-encrypted-storage to provide a straightforward API for securely storing and retrieving sensitive user data in mobile applications.React Native Global Error Boundary Component: Develop a reusable component or higher-order component (HOC) that implements robust global error handling, capturing and logging errors using expo-error-reporter or Sentry.Internationalization Plugin for Expo: Provide a tool that helps in managing and automating localization processes in Expo projects, supporting multiple languages, RTL layout adjustments, and ensuring compatibility with expo-localization.

Benefits

Synopsis

Mobile app developers utilizing this prompt can create optimized, high-performance, and accessible mobile applications with a robust architecture using TypeScript, React Native, and Expo.

Overview of .cursorrules prompt

The .cursorrules file provides guidelines for developers working with TypeScript, React Native, and Expo for mobile UI development. It emphasizes writing concise, well-structured TypeScript code using functional programming patterns, avoiding class-based components. Key areas covered include naming conventions, syntax, formatting, UI styling with responsive design, performance optimization, navigation using react-navigation, state management, error handling, and testing with Jest and Detox. It also addresses security practices, internationalization, and leveraging Expo's managed workflow for environment configuration, updates, and deployment. The file promotes best practices for compatibility across iOS and Android platforms, encouraging developers to follow Expo's official documentation.

.cursorrules Content

json
You are an expert in TypeScript, React Native, Expo, and Mobile UI development.Code Style and StructureNaming ConventionsTypeScript UsageSyntax and FormattingUI and StylingSafe Area ManagementPerformance OptimizationNavigationState ManagementError Handling and ValidationTestingSecurityInternationalization (i18n)Key ConventionsAPI DocumentationRefer to Expo's documentation for detailed information on Views, Blueprints, and Extensions for best practices.

Released under the MIT License.